/* Customization code for component BPosting */
&scoped-define class-version 135.0
{ definition/bposting.i }

{us/bbi/mfdeclre.i "new"}
{us/xx/xxcrtcip.i}

global_user_lang_dir = "us/".
/*
PROCEDURE BPosting.PostSave.after:
  define variable vcMfgDomain1  as  character  no-undo.
   define variable viReturn      as  INTEGER    NO-UNDO.
   define buffer b_oPostingLine for t_oPostingLine.
   define buffer b_oPosting     for t_oPosting.
   define buffer b_sPostingLine for t_sPostingLine.
   define buffer b_sPosting     for t_sPosting.
   define buffer b_iPostingLine for t_iPostingLine.
   define buffer b_iPosting     for t_iPosting.
   define buffer b_apmatching  for apmatching.
   define buffer b_apmatchingln  for APMatchingLn.
   define buffer b_cinvoice  for cinvoice.
   
output to "/home/mfg/finlog/prod/bposting/BPosting.PostSave.after.log".
    
    run getpublicdata(input "vcMfgDomain", output vcMfgDomain1 , output vireturn).
    
    put "vcMfgDomain" vcMfgDomain1 skip.
    
    for each b_sPosting.
    
    put   unformatted "b_sPosting" " " b_sPosting.PostingText " "  skip.
    
    
    
    end.
        for each b_sPostingLine.
    
    put   unformatted "b_sPostingLine" " "  " " b_sPostingLine.PostingLineText " " b_sPostingLine.PostingLineDebitLC " "  b_sPostingLine.PostingLineDebitLC " "  skip.
    
    
    
    end.
    
        for each b_iPosting.
    
    put   unformatted "b_iPosting" " " b_iPosting.PostingText " "  skip.
    
    
    
    end.
        for each b_iPostingLine.
    
    put   unformatted "b_iPostingLine" " "  " " b_iPostingLine.PostingLineText " " b_iPostingLine.PostingLineDebitLC " "  b_iPostingLine.PostingLineDebitLC " "  skip.
    
    
    
    end.
    
 for each b_oPosting,
           each b_oPostingLine of b_oPosting.
            put unformatted  " " b_oPosting.PostingText " " b_oPostingLine.PostingLineDebitLC " "  b_oPostingLine.PostingLineDebitLC skip.
         
   find journal where journal.journal_id = t_oPosting.journal_id  no-lock no-error.
   find GL where GL.GLCode = b_oPostingLine.tcGLCode no-lock no-error.
   find costcentre of b_oPostingLine no-lock no-error.
   find division of b_oPostingLine no-lock no-error.
   find project of b_oPostingLine no-lock no-error.

      
   if journal.JournalTypeCode = "MATCHINGENTRYCIREC" then 
   do:
        
        for each b_apmatchingln where   b_APMatchingLn.VarRatePostingLine_ID      =  b_oPostingLine.PostingLine_ID
                                    or    b_APMatchingLn.VarExchRatCCPostingLine_ID =  b_oPostingLine.PostingLine_ID
                                    or    b_APMatchingLn.PvoPostingLine_ID          =  b_oPostingLine.PostingLine_ID
                                    or    b_APMatchingLn.VarUsagePostingLine_ID     =  b_oPostingLine.PostingLine_ID
                                    or    b_APMatchingLn.RevExpensePostingLine_ID   =  b_oPostingLine.PostingLine_ID
                                    or    b_APMatchingLn.VarExchRatePostingLine_ID  =  b_oPostingLine.PostingLine_ID
                                    or    b_APMatchingLn.NewExpensePostingLine_ID   =  b_oPostingLine.PostingLine_ID
                                    no-lock.
         put unformatted b_apmatchingln.APMatchingLnPvodItem " " b_oPosting.PostingText " " b_oPostingLine.PostingLineDebitLC " "  b_oPostingLine.PostingLineDebitLC skip.
         
         end.
         
   
   end.
  
  end. /*  for each b_oPosting, */

output close.


END PROCEDURE.
*/

/** validate bank entry GL allocating account sub-account by Gaoyan 06/30/19**/

PROCEDURE BPosting.ValidateComponentPost.before:
   define variable vcMfgDomain1  as  character  no-undo.
   define variable viReturn      as  INTEGER    NO-UNDO.
   define variable lvi_msg_nbr as integer   no-undo.    
   define variable lvc_msg_txt as character no-undo.  
   define buffer b_tPostingLine for t_sPostingLine.
   define buffer b_tPosting     for t_sPosting.
   define variable errorst     as   character   no-undo.
   define variable errornum    as   integer     no-undo.
   define variable vc_cipnbr     as  character no-undo.
   define variable l_msg1      like msg_desc    no-undo.
   define variable vc_daybook   as character    no-undo.
   define variable lvc_value      as character extent 10 no-undo.
   define variable lvi_recnt      as  INTEGER    NO-UNDO.
   
   define variable lvi_return as integer   no-undo.
   define variable lvi_session_id as integer   no-undo.
   define variable lvc_session_id as character no-undo.
   define variable vcActivityCode  as character no-undo.
   define variable lvh_session    as handle    no-undo.
   define variable lvh_session1    as handle    no-undo.
   
   
   output to "/home/mfg/finlog/prod/bposting/BPosting.ValidateComponentPost.before.log".
   
   run getpublicdata(input "vcMfgDomain", output vcMfgDomain1 , output vireturn).
   do lvi_recnt = 1 to 10:
   lvc_value[lvi_recnt] = "".
   end.
   lvi_recnt = 0.
   
   
   find first b_tPosting no-error.
   find journal of b_tPosting no-lock no-error.
   vc_daybook = journal.journalcode.
   
   /* 在建工程账务事务创建 */
      /* Retrieve the value for session id*/
      run GetPublicData (input  "viSessionId",
                        output lvc_session_id,
                        output lvi_return).

      assign lvi_session_id = integer(lvc_session_id).
      
      /*
     run  ins/ins__bapmatching.p persistent set lvh_session1.
      run MainBlock in lvh_session1
        (input 0,
         input 0,
         input 0,
         input no,
         input "",
         input-output lvi_session_id,
         output lvi_return).

      if valid-handle(lvh_session1)
      then do:
      run GetPublicTables(  output dataset BAPMatching,                          
                            output lvi_return).
         put unformatted "BAPMatching" lvi_return skip.
       run GetPublicData in lvh_session1 (input  "vcActivityCode ",
                        output vcActivityCode ,
                        output lvi_return).
         put lvi_session_id " vcActivityCode:" vcActivityCode lvi_return skip.
      
         put "MainBlock" skip.
       run StopInstance in lvh_session1
         (input  "SAVE",
          input  "",
          input  "",
          input  no,
          output lvi_return).

         delete procedure lvh_session1.
      
      
      
      end.
      
      */
      
      run ins/ins__session.p persistent set lvh_session.

      run MainBlock in lvh_session
        (input 0,
         input 0,
         input 0,
         input no,
         input "",
         input-output lvi_session_id,
         output lvi_return).

      if valid-handle(lvh_session)
      then do:
	     do lvi_recnt = 1 to 10:
         run GetCharacterValue in lvh_session
            (input "xx_lvc_apmathingid" + string(lvi_recnt), 
             output lvc_value[lvi_recnt] ,
             output lvi_return).
       put unformatted time "  "lvc_session_id " lvc_value" string(lvi_recnt) + ":" lvc_value[lvi_recnt] skip.
   
       end. /* do lvi_recnt = 1 to 10: */

   
        run StopInstance in lvh_session
         (input  "SAVE",
          input  "",
          input  "",
          input  no,
          output lvi_return).

         delete procedure lvh_session.

       end.   /*  if valid-handle(lvh_session) */ 



   for each b_tPostingLine .
   export  b_tPostingLine.
	find GL where GL.GLCode = b_tPostingLine.tcGLCode no-lock no-error.
   find costcentre of b_tPostingLine no-lock no-error.
   find division of b_tPostingLine no-lock no-error.
   find project of b_tPostingLine no-lock no-error.
   find journal where journal.journalcode = b_tPosting.tcJournalCode  no-lock no-error.
   
   
       if can-find(first code_mstr where code_domain = vcMfgDomain1
                                             and code_fldname = "xxcip"
                                             and code_value begins "glcode"
                                             and code_cmmt = GL.GLCode  )                                           
       then 
       do:
       /* 校验在建工程是否输入 */
       
       if b_tPostingLine.CustomLong0 = "" and (lvc_value[1] = "" or lvc_value[1] = ? ) then 
       do:
        lvc_msg_txt = "你必须输入在建工程编号！". 
				   RUN setMessage
                       (INPUT lvc_msg_txt,
                        INPUT "",
                        INPUT "b_tPostingLine.CustomLong0",
                        INPUT b_tPostingLine.CustomLong0,
                        INPUT "E",
                        INPUT 3,
                        INPUT b_tPostingLine.tc_Rowid,
                        INPUT string(lvi_msg_nbr),
                        INPUT "",
                        INPUT "",
                        INPUT "",
                        OUTPUT viReturn).
                assign 
                  t_Parameter.oiReturnStatus = -1.
               return.
            end. /*  if b_tPostingLine.CustomLong0 = "" then  */
            /* 创建事务表 */
          if b_tPostingLine.CustomLong0 <> "" then 
          do:
             vc_cipnbr = "".
           global_domain = vcMfgDomain1.
                {us/bbi/gprun.i ""gpnrmgv.p""
                "(""CIPNBR"",
                    input-output vc_cipnbr,
                    output errorst,
                    output errornum)"}.   
                  if errorst = "yes"
       then do:
              {us/bbi/pxmsg.i &msgnum=errornum &errorlevel=1 &msgbuffer=l_msg1}
              put unformatted "l_msg1:" l_msg1 skip.
       end.      
        put unformatted vc_cipnbr "-" errorst "-" errornum skip.
       find currency of b_tPostingLine no-lock no-error.
      find company of b_tPostingLine no-lock no-error.
          
      run Create_cip_det(input b_tPostingLine.CustomLong0,
                         input vc_cipnbr,
                         input b_tPosting.PostingDate,
                         input today,
                         input b_tPosting.PostingDate,
                         input time ,
                         input "",
                         input company.companycode,
                         input b_tPosting.PostingVoucher,
                         input vc_daybook,
                         input b_tPostingLine.PostingLineSequence,
                         input b_tPostingLine.PostingLineText,
                         input if b_tPostingLine.PostingLineDebitLC <> 0 then gl.glcode else "",
                         input if b_tPostingLine.PostingLineCreditLC <> 0 then gl.glcode else "",
                         input if b_tPostingLine.PostingLineDebitLC <> 0 and avail costcentre then costcentre.costcentrecode else "",
                         input if b_tPostingLine.PostingLineCreditLC <> 0 and avail costcentre  then costcentre.costcentrecode else "",
                         input if b_tPostingLine.PostingLineDebitLC <> 0 and avail division then division.divisioncode else "",
                         input if b_tPostingLine.PostingLineCreditLC <> 0 and avail division then division.divisioncode else "",
                         input if b_tPostingLine.PostingLineDebitLC <> 0 and avail project then project.projectcode else "",
                         input if b_tPostingLine.PostingLineCreditLC <> 0 and avail project then project.projectcode else "",
                         input if b_tPostingLine.PostingLineDebitLC  > 0 then b_tPostingLine.PostingLineDebitLC else 0,
                         input if b_tPostingLine.PostingLineCreditLC > 0 then b_tPostingLine.PostingLineCreditLC else 0,
                         input if b_tPostingLine.PostingLineDebitLC < 0 then  - b_tPostingLine.PostingLineDebitLC else 0,
                         input if b_tPostingLine.PostingLineCreditLC < 0 then - b_tPostingLine.PostingLineCreditLC else 0,
                         input "",
                         input 0,
                         input 0,
                         input currency.currencycode,
                         input "",
                         input vc_daybook,
                         input "",
                         input "",
                         input 0,
                         input "",
                         input vcMfgDomain1,
                         input "mfg").

          
          end. /*  else do: */
            
            
       end. /* if can-find(first code_mstr where code_domain = vcMfgDomain1 */
   end. /* for each b_tPostingLine . */
   
  
	output close.
END PROCEDURE.
/** by gaoyan get Cinvoice GL control account no-use**/
/*
PROCEDURE BPosting.AddControlPosting.before:
    /**
    output to /home/mfg/finlog/prod/bposting/BPosting.AddControlPosting.before.log.
	 for each t_Parameter no-lock. 
	 put t_Parameter.icGLCode skip.
	 
	 end. 
	output close.

  **/
END Procedure.
*/
/** by gaoyan openitem not work should be BJournalentry  **/
/**
PROCEDURE BPosting.AddPostingHeader.after:



END PROCEDURE.
**/
/**  Supplier  account  t_sPostingLine is blank **/
PROCEDURE BPosting.GetPostingLayerTypeCode.before:
define buffer   b_tPostingLine for tPostingLine.
   define buffer   b_tPosting    for tPosting.
   define variable lvc_activity  as   character   no-undo.
   define variable lvc_origref   as   character   no-undo.
   define variable lvl_runapi    like mfc_logical no-undo.
   define variable lvc_curr_user as   character   no-undo.
   define variable lvc_curr_lang as   character   no-undo.

   define variable lvi_session_id as integer   no-undo.
   define variable lvc_session_id as character no-undo.
   define variable lvh_session    as handle    no-undo.
   define variable lvc_value      as character no-undo.
   define variable lvi_return     as integer   no-undo.
   define variable lvc_jeinfo     as character no-undo.
   define variable lvc_newsuppctrlacc as character no-undo.
   define variable lvc_oldsuppctrlacc as character no-undo.
   define variable lvc_newcustctrlacc as character no-undo.
   define variable lvc_oldcustctrlacc as character no-undo.
   
   output to /home/mfg/finlog/prod/bposting/BPosting.GetPostingLayerTypeCode.before.log.

    /* Retrieve the value for session id*/
      run GetPublicData (input  "viSessionId",
                        output lvc_session_id,
                        output lvi_return).

      assign lvi_session_id = integer(lvc_session_id).

      run ins/ins__session.p persistent set lvh_session.

      run MainBlock in lvh_session
        (input 0,
         input 0,
         input 0,
         input no,
         input "",
         input-output lvi_session_id,
         output lvi_return).

      if valid-handle(lvh_session)
      then do:
	  
	     lvc_oldsuppctrlacc = "".
         run GetCharacterValue in lvh_session
            (input "xx_lvc_oldsuppctrlacc",
             output lvc_oldsuppctrlacc,
             output lvi_return).
			 
         lvc_newsuppctrlacc = "".
         run GetCharacterValue in lvh_session
            (input "xx_lvc_newsuppctrlacc"  ,
             output lvc_newsuppctrlacc,
             output lvi_return).
        put "xx_lvc_oldsuppctrlacc " lvc_oldsuppctrlacc      "  xx_lvc_newsuppctrlacc  " lvc_newsuppctrlacc " ".
        if lvc_newsuppctrlacc <> "" and
            lvc_newsuppctrlacc <> ?
        
		then do:
		for each b_tPostingLine.
		put b_tPostingLine.tcGLCode skip.
		end.
	    for each b_tPostingLine where b_tPostingLine.tcGLCode
		   = lvc_oldsuppctrlacc :
    	 find GL where GL.GLCode = lvc_newsuppctrlacc 
		   no-lock no-error.
        put lvc_newsuppctrlacc.
		assign
         b_tPostingLine.tcGLCode = lvc_newsuppctrlacc
		 b_tPostingLine.GL_ID = GL.GL_ID.				  
        end.  /* for each b_tPostingLine */
		 
		end. /* if lvc_newsuppctrlacc <> "" and */
		
		

         run StopInstance in lvh_session
         (input  "SAVE",
          input  "",
          input  "",
          input  no,
          output lvi_return).

         delete procedure lvh_session.
      end. /* if valid-handle(lvh_session) */


output close.

END PROCEDURE.
/*** not work
/* change customer control account above code is not work */

PROCEDURE BPosting.AddControlPosting.after:
define buffer   b_tPostingLine for tPostingLine.
   define buffer   b_tPosting    for tPosting.
   define variable lvc_activity  as   character   no-undo.
   define variable lvc_origref   as   character   no-undo.
   define variable lvl_runapi    like mfc_logical no-undo.
   define variable lvc_curr_user as   character   no-undo.
   define variable lvc_curr_lang as   character   no-undo.

   define variable lvi_session_id as integer   no-undo.
   define variable lvc_session_id as character no-undo.
   define variable lvh_session    as handle    no-undo.
   define variable lvc_value      as character no-undo.
   define variable lvi_return     as integer   no-undo.
   define variable lvc_jeinfo     as character no-undo.
   define variable lvc_newcustctrlacc as character no-undo.
   define variable lvc_oldcustctrlacc as character no-undo.
   
   output to /home/mfg/finlog/prod/bposting/BPosting.AddControlPosting.after.log.

    /* Retrieve the value for session id*/
      run GetPublicData (input  "viSessionId",
                        output lvc_session_id,
                        output lvi_return).

      assign lvi_session_id = integer(lvc_session_id).

      run ins/ins__session.p persistent set lvh_session.

      run MainBlock in lvh_session
        (input 0,
         input 0,
         input 0,
         input no,
         input "",
         input-output lvi_session_id,
         output lvi_return).

      if valid-handle(lvh_session)
      then do:
	  
		/* get new customer control account */
	     lvc_oldcustctrlacc = "".
         run GetCharacterValue in lvh_session
            (input "xx_lvc_oldcustctrlacc",
             output lvc_oldcustctrlacc,
             output lvi_return).
			 
         lvc_newcustctrlacc = "".
         run GetCharacterValue in lvh_session
            (input "xx_lvc_newcustctrlacc"  ,
             output lvc_newcustctrlacc,
             output lvi_return).
        put "xx_lvc_oldcustctrlacc " lvc_oldcustctrlacc      "  xx_lvc_newcustctrlacc  " lvc_newcustctrlacc " " skip.
        if lvc_newcustctrlacc <> "" and
            lvc_newcustctrlacc <> ?
        
		then do:
		for each b_tPostingLine.
		put b_tPostingLine.tcGLCode skip.
		end.
	    for each b_tPostingLine where b_tPostingLine.tcGLCode
		   = lvc_oldcustctrlacc :
    	 find GL where GL.GLCode = lvc_newcustctrlacc 
		   no-lock no-error.
        put lvc_newcustctrlacc.
		assign
         b_tPostingLine.tcGLCode = lvc_newcustctrlacc
		 b_tPostingLine.GL_ID = GL.GL_ID.				  
        end.  /* for each b_tPostingLine */
		 
		end. /* if lvc_newcustctrlacc <> "" and */

         run StopInstance in lvh_session
         (input  "SAVE",
          input  "",
          input  "",
          input  no,
          output lvi_return).

         delete procedure lvh_session.
      end. /* if valid-handle(lvh_session) */


output close.

END PROCEDURE.
**/
/** by gaoyan use to update Supplier control account in Bposting ***/
/*** important ***/
/**
PROCEDURE BPosting.AddPostingSub.after:

   define buffer   b_tPostingLine for tPostingLine.
   define buffer   b_tPosting    for tPosting.
   define variable lvc_activity  as   character   no-undo.
   define variable lvc_origref   as   character   no-undo.
   define variable lvl_runapi    like mfc_logical no-undo.
   define variable lvc_curr_user as   character   no-undo.
   define variable lvc_curr_lang as   character   no-undo.

   define variable lvi_session_id as integer   no-undo.
   define variable lvc_session_id as character no-undo.
   define variable lvh_session    as handle    no-undo.
   define variable lvc_value      as character no-undo.
   define variable lvi_return     as integer   no-undo.
   define variable lvc_jeinfo     as character no-undo.
   define variable lvc_newsuppctrlacc as character no-undo.
   define variable lvc_oldsuppctrlacc as character no-undo.
   
   output to /home/mfg/finlog/prod/bposting/BPosting.AddPostingSub.after.log.

    /* Retrieve the value for session id*/
      run GetPublicData (input  "viSessionId",
                        output lvc_session_id,
                        output lvi_return).

      assign lvi_session_id = integer(lvc_session_id).

      run ins/ins__session.p persistent set lvh_session.

      run MainBlock in lvh_session
        (input 0,
         input 0,
         input 0,
         input no,
         input "",
         input-output lvi_session_id,
         output lvi_return).

      if valid-handle(lvh_session)
      then do:
	  
	     lvc_oldsuppctrlacc = "".
         run GetCharacterValue in lvh_session
            (input "xx_lvc_oldsuppctrlacc" ,
             output lvc_oldsuppctrlacc,
             output lvi_return).
			 
         lvc_newsuppctrlacc = "".
         run GetCharacterValue in lvh_session
            (input "xx_lvc_newsuppctrlacc" ,
             output lvc_newsuppctrlacc,
             output lvi_return).
        put "xx_lvc_oldsuppctrlacc " lvc_newsuppctrlacc
		    "  xx_lvc_newsuppctrlacc  " lvc_newsuppctrlacc .
        if lvc_newsuppctrlacc <> "" and
            lvc_newsuppctrlacc <> ?
        
		then do:
	    for each b_tPostingLine where b_tPostingLine.tcGLCode
		   = lvc_oldsuppctrlacc :
    	 find GL where GL.GLCode = lvc_newsuppctrlacc 
		   no-lock no-error.
        put lvc_newsuppctrlacc.
		assign
         b_tPostingLine.tcGLCode = lvc_newsuppctrlacc
		 b_tPostingLine.GL_ID = GL.GL_ID.				  
        end.  /* for each b_tPostingLine */
		 
		end. /* if lvc_newsuppctrlacc <> "" and */

         run StopInstance in lvh_session
         (input  "SAVE",
          input  "",
          input  "",
          input  no,
          output lvi_return).

         delete procedure lvh_session.
      end. /* if valid-handle(lvh_session) */


output close.

END PROCEDURE.
***/

/*
Procedure: AddControlPosting
Description:
add a posting line on a control GL account to current posting
Parameters:
input icPostingtcRowid
    (tposting.tc_Rowid)
input icGLCode
    ((control) gl account)
input icDivisionCode
    (Sub-Account)
input icIntercoBusinessRelationCode
    (interco)
input icCurrencyCode
    (currency)
input idDebitTC
    (DebitTC)
input idDebitLC
    (DebitLC)
input idDebitCC
    (DebitCC)
input idCreditTC
    (CreditTC)
input idCreditLC
    (CreditLC)
input idCreditCC
    (CreditCC)
input icText
    (Text)
input igMasterId
    (ID of the master object
f.e. for posting on debtor control accounts this is debtor_id)
input igTransactionId
    (ID of the transaction object
f.e. for posting on debtor control accounts this is debtorinvoice_id for payment_id)
input idExchangeRate
    ()
input idExchangeRateScale
    ()
input idPostingLineCCRate
    ()
input idPostingLineCCScale
    ()
input icAllocationKey
    ()
input icCostCentreCode
    ()
input icProjectCode
    ()
input dataset tDefaultSafs
    (Default Safs
All callers should define a temp-table like BPosting:tDefaultSAFs and empty the temp-table right before they call AddControlPosting 
All caller that are supplier-related should create a record in the temp-table like BPosting:tDefaultSAFs with SafConceptCode={&SAFCONCEPT-SUPPLIERTYPE} and SafCode=<supplier-type>. This should be done after the empty temp-table and before the call to AddControlPosting.)
input itExchangeRateDate
    ()
output ogPostingLineId
    (PostingLineId)
input ilLinkedCrCyDaemonReqExists
    ()
input icConsumptionVatCode
    (Vat Code is passed as value to assign PostingLine.ConsumptionVat_ID)
output oiReturnStatus
    (Return status of the method.)
*/




/**
PROCEDURE BPosting.AddControlPosting.after:

END PROCEDURE.
**/

/*
Procedure: AddDefaultSaf
Description:
saf's
Parameters:
input icType
    (type)
input igObjectId
    (object)
input igSafStructureId
    (Saf Structure ID : necessary for posting on project, cost centre, .. so that you knows which saf structure you must take, if this is blank, then the first one will be taken)
input icSafStructureCode
    (Saf Structure Code : necessary for posting on project, cost centre, .. so that you knows which saf structure you must take, if this is blank, then the first one will be taken)
input igGLId
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddDefaultSaf.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddDefaultSaf.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesBQBudgetActual
Description:
AdditionalUpdatesBQBudgetActual; Extra method run in additional updates.
This will run an Api-method in BQBudgetActual to create the QBudgetLinkActual records that will be processed by the daemon to keep the actuals for budgets up-to-date..
Parameters:
input ilSysPropertyIsBudOLCheckGL
    ()
input ilSysPropertyIsBudOLCheckPrj
    ()
input ilSysPropertyIsBudOLCheckCC
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesBQBudgetActual.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesBQBudgetActual.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesBQBudgetActualC
Description:
AdditionalUpdatesBQBudgetActualC; sub-method of AdditionalUpdatesBQBudgetActual that works on the changed instance-data
Parameters:
input-output bgQBudgetLinkActualIDCounter
    (QBudgetLinkActualIDCounter)
input ilPostingIsWithBudget
    ()
input ilIPostingIsWithBudget
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesBQBudgetActualC.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesBQBudgetActualC.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesBQBudgetActualD
Description:
AdditionalUpdatesBQBudgetActualD; sub-method of AdditionalUpdatesBQBudgetActual that works on the deleted instance-data
Parameters:
input-output bgQBudgetLinkActualIDCounter
    (QBudgetLinkActualIDCounter)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesBQBudgetActualD.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesBQBudgetActualD.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesBQBudgetActualN
Description:
AdditionalUpdatesBQBudgetActualN; sub-method of AdditionalUpdatesBQBudgetActual that works on the new instance-data
Parameters:
input-output bgQBudgetLinkActualIDCounter
    (QBudgetLinkActualIDCounter)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesBQBudgetActualN.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesBQBudgetActualN.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesBQPosting
Description:
Extra method run in additional updates.
This will run an Api-method in BQPosting to create the QPostingLine & QPostingSaf records.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesBQPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesBQPosting.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesCreateQPostingLineN
Description:
Create record in the temporary table for the History daemon - for new posting lines
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesCreateQPostingLineN.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesCreateQPostingLineN.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesCrossCyPosting
Description:
Create Cross Company Posting Daemon request
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesCrossCyPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesCrossCyPosting.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesLegDoc
Description:
Update the Legal Document Number.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesLegDoc.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesLegDoc.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesOpenItems
Description:
UpdateOpenItems
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesOpenItems.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesOpenItems.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesPostFallBack
Description:
Create Cross Company Posting Daemon request
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesPostFallBack.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesPostFallBack.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesPre
Description:
Additional Updates before ANCESTOR Code.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesPre.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesPre.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesPreAddGLNumber
Description:
Additional Updates Pre: Additional GL Number
Parameters:
input-output blStartQueryCompPropyIDAllInfo
    (Is Query tqCompanyPropertyByIDAllInfo already started or not ?)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesPreAddGLNumber.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesPreAddGLNumber.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesPreAddGLNumberDet
Description:
This method is to get paramters for calling GetNumber(BNumber), which are companyId, Year.
Also retrieve GL Numbering flag (if using additional numbering)
Parameters:
input igCompanyId
    (Company Id)
input iiPostingYear
    (PostingYear)
input icJournalCode
    ()
output ogSharedCompanyId
    (Company Id used as parameter to call GetNumber(BNumber))
output oiNumberYear
    (Year used to call GetNumber (BNumber)
If "reset number yearyly" is false, it's a fixed number. Otherwise, it's PostingYear.)
output olIsAddNbr
    (return whether company uses additional GL Numbering.)
input-output blStartQueryCompPropByIDAllInfo
    (is query CompanyPropertyByIDAllInfo already started or not ?)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesPreAddGLNumberDet.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesPreAddGLNumberDet.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesPreCreateTempTables
Description:
Create the temp-tables used to pass to other components.  This way, we only need to go through the instance records once.
Parameters:
input ilPostingChanged
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesPreCreateTempTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesPreCreateTempTables.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesPreCreateTempTablesC
Description:
Create the gl open item movement records for CHANGED lines
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesPreCreateTempTablesC.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesPreCreateTempTablesC.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesPreCreateTempTablesD
Description:
Create the gl open item movement records for DELETED lines
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesPreCreateTempTablesD.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesPreCreateTempTablesD.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesPreCreateTempTablesN
Description:
Create the gl open item movement records for NEW lines
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesPreCreateTempTablesN.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesPreCreateTempTablesN.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdatesTemplate
Description:
UpdateTemplate
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalUpdatesTemplate.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdatesTemplate.after:

END PROCEDURE.
**/

/*
Procedure: AddPostingHeader
Description:
initialise a posting
Parameters:
input igCompanyId
    (Company ID of the caller)
input iiPeriodYear
    (Accounting Year)
input iiPeriodPeriod
    (accounting period)
input icJournalCode
    (accounting journal)
input icReportingJournalCode
    ()
input iiVoucher
    (When zero, a number will be fetched.
When not zero, this number will be used.)
input itPostingDate
    (posting date)
input itValueDate
    (value date (optional))
input icPostingText
    (PostingText)
input icPostingBusinessRelationText
    (PostingBusinessRelationText)
input icPostingInvoiceReferenceText
    (PostingInvoiceReferenceText)
input icPostingParentText
    (PostingParentText)
input igBPeriodId
    (Instance of Period)
input icPostingOriginAddressCode
    (customer or supplier code (not used anymore))
input icPostingOriginDocument
    (Invoice number or description of the line or year/number or .....(not used anymore))
input icPostingOriginDocumentType
    (Invoice Type or document type or journal type or ....(not used anymore))
input icBatchNumber
    (Batch number of created posting.)
input icBankImpLineRef
    (Bank Importing Reference)
output ogPostingId
    ()
output ocRowid
    (tposting.tc_Rowid)
output oiPostingVoucher
    (voucher number)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddPostingHeader.before:

END PROCEDURE.
**/



/*
Procedure: AddPostingLineExchRateGainLoss
Description:
This method does creation of the exchange gain/lose posting both for the LC and/or CC. Method can generate both realized and unrealized gain/lose transacctions.
Parameters:
input icPostingtcRowId
    (Row Id of the posting header)
input icExchangeRateGainLoseType
    (This parameter defines, whether system will create posting to the realized exchange rate gain/lose account ({&EXCHANGERATETYPE_REALIZED}) or to unrealized exchange rate gain/lose account ({&EXCHANGERATETYPE_UNREALIZED}))
input idDeltaDebitLC
    ()
input idDeltaCreditLC
    ()
input idDeltaDebitCC
    ()
input idDeltaCreditCC
    ()
input idLCExchangeRate
    ()
input idLCExchangeRateScale
    ()
input idCCExchangeRate
    ()
input idCCExchangeRateScale
    ()
input icPostingLineTextPre
    ()
input itExchangeRateDate
    (Exchange rate date)
input icCurrencyCode
    (Code of the transactional currency, from which the calculation of exchange rate gain/loss was done.)
output ogLCPostingLine_ID
    (ID of the PostingLine created for LC exchange rate gain or lose posting)
output ogCCPostingLine_ID
    (ID of the PostingLine for the CC exchange rate gain/lose posting)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddPostingLineExchRateGainLoss.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddPostingLineExchRateGainLoss.after:

END PROCEDURE.
**/

/*
Procedure: AddPostingLineTax
Description:
Public and non-remoting method to create a posting-line on a tax account without having a temp-table as input.
Parameters:
input icPostingTcRowid
    (The tc_rowid of the posting your want a new posting-line for)
input itTaxPointDate
    (tax point date of the posting-line)
input icPostingLineText
    (Posting-line-text)
input icCurrencyCode
    (Currency Code of the posting-line that will be created)
input icPostingVatInOut
    (Indicates the direction of the taxes: for supplier invoices this will normaly be the incomming direction.
Use proprocessors: VATINOUT)
input icPostingVatCode
    ()
input icPostingVatDomain
    ()
input idExchangeRate
    (Exchange Rate of the posting-line that will be created.
This is the rate information between TC and LC)
input idExchangeRateScale
    (Exchange Rate Scale of the posting-line that will be created.
This is the rate information between TC and LC)
input icExchangeRateType
    (Type of the exchange rate  of the posting-line that will be created.
This is the rate information between TC and LC)
input idCCExchangeRate
    (Statutory currency exchange rate)
input idCCExchangeRateScale
    (Statutory currency exchange rate scale)
input icTransactionType
    (Transaction-Type: corresponds with field PostingVat.PostingVatTransType.
Use following preprocessores to fill this parameter: VATTRANSACTIONTYPES)
input icTaxTransactionType
    (Tax-Transaction-Type: corresponds with no specific field in the posting but is used to determine some other information.
Pass following preprocessors for this parameter:
VATTAXTRANSACTIONTYPES)
input idBaseDebitTC
    (Base-Debit -amount in TC of the posting-line that will be created)
input idBaseCreditTC
    (Base-Credit-amount in TC of the posting-line that will be created)
input idBaseDebitLC
    (Base-Debit -amount in LC of the posting-line that will be created)
input idBaseCreditLC
    (Base-Credit-amount in LC of the posting-line that will be created)
input idBaseDebitCC
    (Base-Debit-amount in CC of the posting-line that will be created)
input idBaseCreditCC
    (Base-Credit-amount in CC of the posting-line that will be created)
input idVatDebitTC
    (Vat-Debit-amount in TC of the posting-line that will be created)
input idVatCreditTC
    (Vat-Credit-amount in TC of the posting-line that will be created)
input idVatDebitLC
    (Vat-Debit-amount in LC of the posting-line that will be created)
input idVatCreditLC
    (Vat-Credit-amount in LC of the posting-line that will be created)
input idVatDebitCC
    (Vat-Debit-amount in CC of the posting-line that will be created)
input idVatCreditCC
    (Vat-Credit-amount in CC of the posting-line that will be created)
input icNormalTaxGLCode
    (GL-code of the posting-line that will be created)
input icNormalTaxDivisionCode
    (Division-code of the posting-line that will be created)
input ilNormalTaxIsAlreadyAbsRet
    (NormalTaxIsAlreadyAbsRet: set to true in case the posting-line and posting-vat identified by icNormalTaxGLCode concerns an absorbed or retained tax. 
If this parameter is true then icAbsRetTaxGLCode should be empty)
input icAbsRetTaxGLCode
    (GL-Code that will be used for the tax-postingline that covers the absorbed or retained taxes)
input icAbsRetTaxDivisionCode
    (DivisionCode that will be used for the tax-postingline that covers the absorbed or retained taxes)
input icFromTaxZone
    (From Tax Zone)
input icToTaxZone
    (To Tax Zone)
input icTaxEnvrionment
    (Tax Environment)
input ilIsTaxable
    (Is Taxable flag)
input icTaxClass
    (Tax Class)
input icTaxUsage
    (Tax Usage)
input icTaxType
    (Tax Type)
input ilTaxIsReverseChargeDomestic
    (Corresponds with the taxf-lag: tx2_reverse_charge)
input igTaxAddressID
    (Ship From Address ID in case of purchasing: this paramater is not indeed if the next 5 parameters about the Tax are specified.
If this field is filled, then the next 5 parameters are not taken into account.)
input icTaxIDFeder
    (TaxIDFeder of the TaxAddress)
input icTaxIDState
    (State of the TaxAddress)
input icTaxIDMisc1
    (Misc1 of the TaxAddress)
input icTaxIDMisc2
    (Misc2 of the TaxAddress)
input icTaxIDMisc3
    (Misc3 of the TaxAddress)
input igOwnAddressID
    (Ship To Address ID (address of our own company) in case of purchasing: this parameter is not indeed if the next 6 parameters about the Own-address are specified.
If this field is filled, then the next 6 parameters are not taken into account.)
input icOwnTaxIDFeder
    (OwnTaxIDFeder: Feder of the own address)
input icOwnTaxIDState
    (OwnTaxIDState: State of the own address)
input icOwnTaxIDMisc1
    (OwnTaxIDMisc1: Misc1 of the own address)
input icOwnTaxIDMisc2
    (OwnTaxIDMisc2: Misc2 of the own address)
input icOwnTaxIDMisc3
    (OwnTaxIDMisc3: Misc3 of the own address)
input iiOwnTaxIDDeclarat
    (OwnTaxIDDeclarat: Declarat of the own address)
input ilIsSuspDel
    (ilIsSuspDel: Is the tax marked as Suspended or Delayed tax)
output ogNormalTaxPostingLineID
    (Posting-line ID of the posting-line on the normal tax-account)
output ocNormalTaxPostingLineTcRowid
    (TcRowid of the Posting-line of the posting-line on the normal tax-account)
output ogAbsRetTaxPostingLineID
    (ID of the Posting-line of the posting-line for the absorbed or retained tax)
output ocAbsRetTaxPostingLineTcRowid
    (TcRowid of the Posting-line of the posting-line for the absorbed or retained tax)
output ogNormalTaxPostingVatID
    (Posting Vat ID of the normal tax)
input ilLinkedCrCyDaemonReqExists
    ()
input ilCalledFromMoveSuspDelTax
    ()
input itInvoiceExchangeRateDate
    (If this is set then this will be the exchange date used to retrieve the exchange rate)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddPostingLineTax.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddPostingLineTax.after:

END PROCEDURE.
**/

/*
Procedure: AddPostingLineTaxForSuspDel
Description:
Create two posting tax lines, one to reverse the original suspended/delayed tax account and one to create the newly posting tax line on the normal tax account.
Parameters:
input icPostingTcRowid
    ()
input itPaymentTaxPointDate
    ()
input itInvoiceTaxPointDate
    ()
input icPostingLineText
    ()
input icCurrencyCode
    ()
input icSuspDelTaxGLCode
    ()
input icSuspDelTaxDivisionCode
    ()
input icNormalTaxGLCode
    ()
input icNormalTaxDivisionCode
    ()
input icPostingVatInOut
    ()
input icPostingVatCode
    ()
input icPostingVatDomain
    ()
input idExchangeRate
    ()
input idExchangeRateScale
    ()
input icExchangeRateType
    ()
input icTransactionType
    ()
input icTaxTransactionType
    ()
input idBaseDebitTC
    ()
input idBaseCreditTC
    ()
input idBaseDebitLC
    ()
input idBaseCreditLC
    ()
input idBaseDebitCC
    ()
input idBaseCreditCC
    ()
input idVatDebitTC
    ()
input idVatCreditTC
    ()
input idVatDebitLC
    ()
input idVatCreditLC
    ()
input idVatDebitCC
    ()
input idVatCreditCC
    ()
input icFromTaxZone
    ()
input icToTaxZone
    ()
input icTaxEnv
    ()
input ilIsTaxable
    ()
input icTaxClass
    ()
input icTaxUsage
    ()
input icTaxType
    ()
input ilIsRevCharge
    ()
input igTaxAddressID
    ()
input icTaxIDFederal
    ()
input icTaxIDState
    ()
input icTaxIDMisc1
    ()
input icTaxIDMisc2
    ()
input icTaxIDMisc3
    ()
input igOwnAddressID
    ()
input icOwnTaxIDFedral
    ()
input icOwnTaxIDState
    ()
input icOwnTaxIDMisc1
    ()
input icOwnTaxIDMisc2
    ()
input icOwnTaxIDMisc3
    ()
input iiOwnTaxDecl
    ()
input itInvoicePostingDate
    ()
input icTaxRateType
    ()
input ilIsDelayedTax
    ()
input itInvoiceExchangeRateDate
    (If this date is filled, then it wil be the date to be used to calculate the exchange rate)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddPostingLineTaxForSuspDel.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddPostingLineTaxForSuspDel.after:

END PROCEDURE.
**/

/*
Procedure: AddPostingLineTaxValAndDef
Description:
AddPostingLineTaxValAndDef: submethod of AddPostingLineTax: validations and defaulting of the parameters
Parameters:
input-output bcPostingTcRowid
    (The tc_rowid of the posting your want a new posting-line for)
input-output btTaxPointDate
    (tax point date of the posting-line)
input-output bcPostingLineText
    (Posting-line-text)
input-output bcCurrencyCode
    (Currency Code of the posting-line that will be created)
input-output bcPostingVatInOut
    (Indicates the direction of the taxes: for supplier invoices this will normaly be the incomming direction.
Use proprocessors: VATINOUT)
input icPostingVatCode
    ()
input icPostingVatDomain
    ()
input-output bdExchangeRate
    (Exchange Rate of the posting-line that will be created.
This is the rate information between TC and LC)
input-output bdExchangeRateScale
    (Exchange Rate Scale of the posting-line that will be created.
This is the rate information between TC and LC)
input-output bcExchangeRateType
    (Type of the exchange rate  of the posting-line that will be created.
This is the rate information between TC and LC)
input-output bcTransactionType
    (Transaction-Type: corresponds with field PostingVat.PostingVatTransType.
Use following preprocessores to fill this parameter: VATTRANSACTIONTYPES)
input-output bcTaxTransactionType
    (Tax-Transaction-Type: corresponds with no specific field in the posting but is used to determine some other information.
Pass following preprocessors for this parameter:
VATTAXTRANSACTIONTYPES)
input-output bdBaseDebitTC
    (Base-Debit -amount in TC of the posting-line that will be created)
input-output bdBaseCreditTC
    (Base-Credit-amount in TC of the posting-line that will be created)
input-output bdBaseDebitLC
    (Base-Debit -amount in LC of the posting-line that will be created)
input-output bdBaseCreditLC
    (Base-Credit-amount in LC of the posting-line that will be created)
input-output bdBaseDebitCC
    (Base-Debit-amount in CC of the posting-line that will be created)
input-output bdBaseCreditCC
    (Base-Credit-amount in CC of the posting-line that will be created)
input-output bdVatDebitTC
    (Vat-Debit-amount in TC of the posting-line that will be created)
input-output bdVatCreditTC
    (Vat-Credit-amount in TC of the posting-line that will be created)
input-output bdVatDebitLC
    (Vat-Debit-amount in LC of the posting-line that will be created)
input-output bdVatCreditLC
    (Vat-Credit-amount in LC of the posting-line that will be created)
input-output bdVatDebitCC
    (Vat-Debit-amount in CC of the posting-line that will be created)
input-output bdVatCreditCC
    (Vat-Credit-amount in CC of the posting-line that will be created)
input-output bcNormalTaxGLCode
    (GL-code of the posting-line that will be created)
input-output bcNormalTaxDivisionCode
    (Division-code of the posting-line that will be created)
input-output blNormalTaxIsAlreadyAbsRet
    (NormalTaxIsAlreadyAbsRet: set to true in case the posting-line and posting-vat identified by icNormalTaxGLCode concerns an absorbed or retained tax. 
If this parameter is true then icAbsRetTaxGLCode should be empty)
input-output bcAbsRetTaxGLCode
    (GL-Code that will be used for the tax-postingline that covers the absorbed or retained taxes)
input-output bcAbsRetTaxDivisionCode
    (DivisionCode that will be used for the tax-postingline that covers the absorbed or retained taxes)
input-output bcFromTaxZone
    (From Tax Zone)
input-output bcToTaxZone
    (To Tax Zone)
input-output bcTaxEnvrionment
    (Tax Environment)
input-output blIsTaxable
    (Is Taxable flag)
input-output bcTaxClass
    (Tax Class)
input-output bcTaxUsage
    (Tax Usage)
input-output bcTaxType
    (Tax Type)
input igTaxAddressID
    (Ship From Address ID in case of purchasing: this paramater is not indeed if the next 5 parameters about the Tax are specified.
If this field is filled, then the next 5 parameters are not taken into account.)
input-output bcTaxIDFeder
    (TaxIDFeder of the TaxAddress)
input-output bcTaxIDState
    (State of the TaxAddress)
input-output bcTaxIDMisc1
    (Misc1 of the TaxAddress)
input-output bcTaxIDMisc2
    (Misc2 of the TaxAddress)
input-output bcTaxIDMisc3
    (Misc3 of the TaxAddress)
input igOwnAddressID
    (Ship To Address ID (address of our own company) in case of purchasing: this parameter is not indeed if the next 6 parameters about the Own-address are specified.
If this field is filled, then the next 6 parameters are not taken into account.)
input-output bcOwnTaxIDFeder
    (OwnTaxIDFeder: Feder of the own address)
input-output bcOwnTaxIDState
    (OwnTaxIDState: State of the own address)
input-output bcOwnTaxIDMisc1
    (OwnTaxIDMisc1: Misc1 of the own address)
input-output bcOwnTaxIDMisc2
    (OwnTaxIDMisc2: Misc2 of the own address)
input-output bcOwnTaxIDMisc3
    (OwnTaxIDMisc3: Misc3 of the own address)
input-output biOwnTaxIDDeclarat
    (OwnTaxIDDeclarat: Declarat of the own address)
input-output blIsSuspDel
    (ilIsSuspDel: Is the tax marked as Suspended or Delayed tax)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddPostingLineTaxValAndDef.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddPostingLineTaxValAndDef.after:

END PROCEDURE.
**/

/*
Procedure: AddPostingSub
Description:
sub
Parameters:
input icGLCode
    (GL Account)
input icDivisionCode
    (Sub-Account Code)
input icCurrencyCode
    (Currency Code)
input icBusinessRelationIntercoCode
    (BusinessRelationIntercoCode)
input ilLinkedCrCyDaemonReqExists
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddPostingSub.before:

END PROCEDURE.
**/


/*
Procedure: AddStandardPosting
Description:
add a posting line on any gl account (except control and VAT accounts) to current posting
Parameters:
input icPostingtcRowid
    (tposting.tc_Rowid)
input icGLCode
    (gl account)
input icDivisionCode
    (Sub-Account)
input icCostCentreCode
    (cost centre)
input icCostCentreText
    (Text)
input icProjectCode
    (project)
input icProjectText
    (Text)
input icIntercoBusinessRelationCode
    (interco)
input icCurrencyCode
    (currency)
input idDebitTC
    (DebitTC)
input idDebitLC
    (DebitLC (use NULL if value should be calculated))
input idDebitCC
    (DebitCC (use NULL if value should be calculated))
input idDebitPC
    (DebitPC (use NULL if value should be calculated))
input idCreditTC
    (CreditTC)
input idCreditLC
    (CreditLC (use NULL if value should be calculated))
input idCreditCC
    (CreditCC (use NULL if value should be calculated))
input idCreditPC
    (CreditPC (use NULL if value should be calculated))
input idQty
    (Quantity)
input icLineText
    (Text)
input icSafText
    (Text)
input dataset tDefaultSafs
    (default saf's)
input icExchangeRateType
    (exchange rate type)
input idExchangeRate
    ()
input idExchangeRateScale
    ()
input idPostingLineCCRate
    ()
input idPostingLineCCScale
    ()
output ogPostingLineId
    (Posting Line ID)
input igSafStructureId
    (Saf Structure ID : necessary for posting on project, cost centre, .. so that you knows which saf structure you must take, if this is blank, then the first one will be taken)
input icSafStructureCode
    (Saf Structure Code : necessary for posting on project, cost centre, .. so that you knows which saf structure you must take, if this is blank, then the first one will be taken)
input icAllocationKey
    ()
input ilLinkedCrCyDaemonReqExists
    ()
input itExchangeRateDate
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddStandardPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddStandardPosting.after:

END PROCEDURE.
**/

/*
Procedure: AddTaxPosting
Description:
add a Tax posting to the journal entry
Parameters:
input icPostingtcRowid
    (tposting.tc_Rowid)
input icPostingLineTcRowid
    (Field-value of tc_rowid of the tpostingline you are creating tax-information for.
This field can be left empty when you do not have a PostingLine yet.)
input itTaxPointDate
    (tax point date)
input icDescription
    ()
input icCurrencyCode
    (Currency Code)
input igCurrencyId
    (currency id)
input icExchangeRateType
    ()
input idExchangeRate
    (exchange rate)
input idExchangeRateScale
    ()
input idCCRate
    ()
input idCCRateScale
    ()
input idBaseDebit
    (base TC)
input idBaseCredit
    (base TC)
input idFullDebit
    (full TC)
input idFullCredit
    (full TC)
input icInvoiceType
    (Invoice Type : must be Invoice or Credit Note)
input ilCalculateVat
    (do you want to calculate the vat(yes) or do you want to work on input temptable (false) ?)
input-output dataset tTaxDetailPosting
    (Tax Detail Posting temp table, so not recalculate the tax amounts but work with this ...)
input icCaller
    ()
input ilIsVatDelay
    ()
input icDivisionCode
    ()
input icVatCurrencyCode
    ()
input igVatCurrencyId
    ()
input idVatExchangeRate
    (Exchange rate between Transactional currency and Vat currency.)
input idVatExchangeRateScale
    ()
input icTransactionType
    (Transaction Type)
input icTxclTaxCls
    (Tax Class)
input icTxuTaxUsage
    (Tax Usage)
input icFromTxzTaxZone
    (from Tax Zone)
input icToTxzTaxZone
    (To Tax Zone)
input icTxenvTaxEnv
    (Tax Environment)
input icDocumentReference
    (Document Reference)
input icDocumentNumber
    (Document Number)
input icPaymentCondition
    (Payment Condition)
input ilIsTaxInCityFromCompany
    (tax in city flag of the company)
input ilIsTaxInCityFromShipTo
    (tax in city flag of the ship to address)
input ilCustomerInvoice
    (indication if we work with a customer invoice or a supplier invoice, necessary to know if it is debit or credit)
input icControlGLCode
    (control GL Account)
input igMasterId
    (ID of customer, supplier, ...)
input igTransactionId
    (id of customer invoice, supplier invoice,....)
input icTaxGLCode
    (GL Code for tax : if linked to po where accrue tax at receipt or accrue tax at usage is set, then purchase order receipt account)
input ilIsTaxable
    (Is Taxable flag)
input idAdjustmentFactor
    (Adjustment Factor)
input icCostCentreCode
    ()
input icProjectCode
    ()
input igShipFromAddressId
    (Ship From Address ID : necessary to fill the federal tax, state tax, misc .... Not needed for manual journal entries)
input igShipToAddressId
    (Ship To Address ID : necessary to fill the federal tax, state tax, misc .... Not needed for manual journal entries)
input icTaxTransactionType
    (tax transaction type)
input icSoldToDebtorCode
    (Sold To Debtor Code : only passed when it is the same as the ship to code, then the tax id fields, must be defaulted from the sold to debtor code for customer invoices)
input-output bgFirstVatPostingLineId
    ()
output ogSecondVatPostingLineId
    (SecondVatPostingLineId: In case an additional posting-line with a postng-tax was created, this field will contain the postinglineID of the second postingline)
output ocPostingLineIds
    (list of all postingline ids that are made here, necessary for manual journal entry, separated by comma)
input ilLinkedCrCyDaemonReqExists
    ()
input icTaxTypeCode
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddTaxPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddTaxPosting.after:

END PROCEDURE.
**/

/*
Procedure: AddTaxPostingAddress
Description:
get the tax id's for the ship from and ship to address
Parameters:
input igShipFromAddressId
    (Ship From Address ID)
input igShipToAddressId
    (Ship To Address ID)
input ilCustomerInvoice
    (Customer invoice or not ?)
input igCreditorId
    (Creditor ID : used to search the right creditor and to fill the tax id fields of posting vat)
input icSoldToDebtorCode
    (Sold To Debtor Code : if that is filled, then fill the tax id fields of postingvat with those of the sold to debtor)
output ocOwnTaxIdFederal
    (Own Tax ID federal)
output ocOwnTaxIdState
    (Own Tax ID State)
output ocOwnTaxIdMisc1
    (Own Tax ID Misc 1)
output ocOwnTaxIdMisc2
    (Own Tax ID Misc 2)
output ocOwnTaxIdMisc3
    (Own Tax ID Misc 3)
output oiOwnTaxDeclaration
    (Own Tax Declaration)
output ocTaxIdFederal
    (Tax Id Federal)
output ocTaxIdState
    (Tax ID State)
output ocTaxIdMisc1
    (Tax Id Misc 1)
output ocTaxIdMisc2
    (Tax ID Misc 2)
output ocTaxIdMisc3
    (Tax ID Misc 3)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddTaxPostingAddress.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddTaxPostingAddress.after:

END PROCEDURE.
**/

/*
Procedure: AddTaxPostingDetail
Description:
detail section of the add Tax posting to the journal entry
Parameters:
input icPostingLineTcRowid
    (Field-value of tc_rowid of the tpostingline you are creating tax-information for.
This field can be left empty when you do not have a PostingLine yet.)
input itTaxPointDate
    (tax point date)
input icDescription
    ()
input icCurrencyCode
    (Currency Code)
input igCurrencyId
    (currency id)
input idExchangeRate
    (exchange rate)
input idExchangeRateScale
    ()
input idBaseDebit
    (base TC)
input idBaseCredit
    (base TC)
input idFullDebit
    (full TC)
input idFullCredit
    (full TC)
input icInvoiceType
    (Invoice Type : must be Invoice or Credit Note)
input ilCalculateVat
    (do you want to calculate the vat(yes) or do you want to work on input temptable (false) ?)
input icDivisionCode
    ()
input icVatCurrencyCode
    ()
input igVatCurrencyId
    ()
input idVatExchangeRate
    (Exchange rate between Transactional currency and Vat currency.)
input idVatExchangeRateScale
    ()
input icTransactionType
    (Transaction Type)
input icTxclTaxCls
    (Tax Class)
input ilCustomerInvoice
    (indication if we work with a customer invoice or a supplier invoice, necessary to know if it is debit or credit)
input icControlGLCode
    (control GL Account)
input icTaxGLCode
    (GL Code for tax : if linked to po where accrue tax at receipt or accrue tax at usage is set, then purchase order receipt account)
input icCostCentreCode
    ()
input icProjectCode
    ()
input icTaxTransactionType
    (tax transaction type)
input iiCounter
    (Counter)
input idTotalDB
    (Total DB)
input idTotalCR
    (Total CR)
input icOwnTaxIDFederal
    (Own Tax ID federal)
input icOwnTaxIDState
    (Own Tax ID State)
input icOwnTaxIDMisc1
    (Own Tax ID Misc 1)
input icOwnTaxIDMisc2
    (Own Tax ID Misc 2)
input icOwnTaxIDMisc3
    (Own Tax ID Misc 3)
input iiOwnTaxDeclaration
    (Own Tax Declaration)
input icPostingVatTaxIdFederal
    (Posting Vat Tax ID Federal)
input icPostingVatTaxIdState
    (Posting Vat Tax Id State)
input icPostingVatTaxIdMisc1
    (Posting Vat Tax ID Misc1)
input icPostingVatTaxIdMisc2
    (Posting Vat Tax Id Misc2)
input icPostingVatTaxIdMisc3
    (Posting Vat Tax ID Misc 3)
input idRateCC
    (Rate CC)
input idRateScaleCC
    (Rate Scale CC)
input-output bgFirstVatPostingLineId
    ()
output ogSecondVatPostingLineId
    (SecondVatPostingLineId: In case an additional posting-line with a postng-tax was created, this field will contain the postinglineID of the second postingline)
output ocPostingLineIds
    (list of all postingline ids that are made here, necessary for manual journal entry, separated by comma)
input ilLinkedCrCyDaemonReqExists
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddTaxPostingDetail.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddTaxPostingDetail.after:

END PROCEDURE.
**/

/*
Procedure: AddTaxPostingFillCCAmounts
Description:
fill the cc amounts of posting line and posting vat
Parameters:
input igCurrencyId
    (Currency ID)
input idExchangeRate
    (Exchange Rate)
input idExchangeRateScale
    (exchange rate scale)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddTaxPostingFillCCAmounts.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddTaxPostingFillCCAmounts.after:

END PROCEDURE.
**/

/*
Procedure: AddTaxPostingGetExchRates
Description:
get the exchange rates
Parameters:
input igCompanyID
    ()
input igCurrencyId
    (Currency ID)
input icExchangeRateType
    (Exchange Rate Type)
input itTaxPointDate
    (Tax Point Date)
input-output bdExchangeRateLC
    (Exchange Rate from TC to LC)
input-output bdExchangeRateScaleLC
    (Scale factor for exchange rate from TC to LC)
input-output bdExchangeRateCC
    (Exchange Rate for CC)
input-output bdExchangeRateScaleCC
    (Scale factor for cc exchange rate)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddTaxPostingGetExchRates.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddTaxPostingGetExchRates.after:

END PROCEDURE.
**/

/*
Procedure: AddTaxPostingPartTwo
Description:
second part of tax posting
Parameters:
input ilCustomerInvoice
    (do we work with customer or supplier invoice ?)
input icControlGLCode
    (control GL Account)
input icDescription
    ()
input igCurrencyId
    (currency ID)
input icCurrencyCode
    (Currency Code)
input idExchangeRate
    (Exchange  Rate)
input idExchangeRateScale
    (Scale factor of the exchange rate)
input icDivisionCode
    (DivisionCode)
input idRateCC
    (Exchange Rate in CC)
input idRateScaleCC
    (Exchange Rate Scale CC)
input igMasterId
    (Master id)
input igTransactionId
    (Transaction ID)
input icTxclTaxCls
    (Tax Class)
input icTransactionType
    (Transaction Type)
input itTaxPointDate
    (Tax point date)
input icInvoiceType
    (Dinvoice TYpe)
input icCostCentreCode
    ()
input icProjectCode
    ()
input ilIsReverseCharge
    (Is Reverse Charge flag)
input icTaxTransactionType
    (Tax Transaction Type)
input ilDebit
    (Post on Debit or Credit for tax transaction type AR Transactions and AP Transaction)
input-output biPostingLineSequenceCounter
    (The highest value for field PostingLineSequence in the PostingLines of the current posting)
output ogPostingLineID
    ()
input ilLinkedCrCyDaemonReqExists
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddTaxPostingPartTwo.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddTaxPostingPartTwo.after:

END PROCEDURE.
**/

/*
Procedure: AddTaxPostingSetMessage
Description:
set message
Parameters:
input icMessage
    (Message)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AddTaxPostingSetMessage.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddTaxPostingSetMessage.after:

END PROCEDURE.
**/

/*
Procedure: ApiCheckTaxTypeUsed
Description:
Check if tax type is used in postingvat
Parameters:
input icTxtyTaxType
    (Tax Type for which you want to check if it is used in the postingvat records.)
output olTaxTypeIsUsed
    (True when the Tax Type used in postingvat.  False if the tax type is not used in the PostingVat records.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiCheckTaxTypeUsed.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiCheckTaxTypeUsed.after:

END PROCEDURE.
**/

/*
Procedure: ApiDumpPostingInXML
Description:
ApiDumpPostingInXML; method that will load a posting and then dump the content of the instance in an xml-file
Parameters:
input igPostingID
    (PostingID; posting-ID of the posting that needs to be dumped)
input icFileName
    (Name of the file that will contain the dumped posting in xml-format)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiDumpPostingInXML.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiDumpPostingInXML.after:

END PROCEDURE.
**/

/*
Procedure: ApiGetSafConceptsForPosting
Description:
Retrieves the saf concepts for a posting line based on the gl code, cost center code and project code
Parameters:
input icGLCode
    ()
input icCostCenterCode
    ()
input icProjectCode
    ()
output dataset tApiSafConceptsForPosting
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiGetSafConceptsForPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiGetSafConceptsForPosting.after:

END PROCEDURE.
**/

/*
Procedure: ApiGetSafStructuresForPosting
Description:
Retrieves the saf structures for a posting line based on the gl code
Parameters:
input igCompanyID
    ()
input icGLCode
    ()
input icCostCenterCode
    ()
input icProjectCode
    ()
output dataset tApiSafStructuresForPosting
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiGetSafStructuresForPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiGetSafStructuresForPosting.after:

END PROCEDURE.
**/

/*
Procedure: ApiMassDeletePeriodicCostingPostings
Description:
ApiMassDeletePeriodicCostingPostings; this api-method is called from the Periodic-costing module to delete a bunch of postings of a certain company, journal (type periodic costing) and period.
The method returns a temp-table holding the main info of the postings that are deleted.
Parameters:
input icCompanyCode
    (CompanyCode: Mandatory.
This should be the current company)
input icJournalCode
    (JornalCode: Mandatory.
The type of this journal should be Periodic-costing)
input iiPostingYear
    (PostingYear: Mandatory. accounting-year format 9999)
input iiPostingPeriod
    (PostingPeriod: Mandatory. accounting-period format 99)
output dataset tApiPeriodicCostingPostings
    (Output temp-table holding the main references on the postings that will be removed by this method.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiMassDeletePeriodicCostingPostings.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiMassDeletePeriodicCostingPostings.after:

END PROCEDURE.
**/

/*
Procedure: ApiMassDeletePeriodicCostingPostingsByDomain
Description:
ApiMassDeletePeriodicCostingPostingsByDomain; this api-method is called from the Periodic-costing module to delete a bunch of postings of a certain domain, journal (type periodic costing) and period.
The method returns a temp-table holding the main info of the postings that are deleted.
Parameters:
input icDomainCode
    (DomainCode: Mandatory.
This should be the current domain)
input icJournalCode
    (JornalCode: Mandatory.
The type of this journal should be Periodic-costing)
input iiPostingYear
    (PostingYear: Mandatory. accounting-year format 9999)
input iiPostingPeriod
    (PostingPeriod: Mandatory. accounting-period format 99)
output dataset tApiPeriodicCostingPostings
    (Output temp-table holding the main references on the postings that will be removed by this method.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiMassDeletePeriodicCostingPostingsByDomain.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiMassDeletePeriodicCostingPostingsByDomain.after:

END PROCEDURE.
**/

/*
Procedure: ApiMassDeletePeriodicCostingPostingsTest
Description:
Test-method that sinmply runs method ApiMassDeletePeriodicCostingPostings; this api-method is named like the called one  (including the prefix Api although this is not a real api-method).
The method returns a temp-table holding the main info of the postings that are deleted.
Parameters:
input icCompanyCode1
    (CompanyCode: Mandatory.)
input icCompanyCode2
    (Compamny Code: Mandatory)
input icJournalCode
    (JornalCode: Mandatory.
The type of this journal should be Periodic-costing)
input iiPostingYear
    (PostingYear: Mandatory. accounting-year format 9999)
input iiPostingPeriod
    (PostingPeriod: Mandatory. accounting-period format 99)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiMassDeletePeriodicCostingPostingsTest.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiMassDeletePeriodicCostingPostingsTest.after:

END PROCEDURE.
**/

/*
Procedure: ApiMassReversePeriodicCostingPostings
Description:
ApiMassReversePeriodicCostingPostings; this api-method is called from the Periodic-costing module to reverse a bunch of postings of a certain company, journal (type periodic costing and layer official or management) and period.
The method returns a temp-table holding the main info of the postings that are reversed.
Parameters:
input icCompanyCode
    (CompanyCode: Mandatory.
This should be the current company)
input icJournalCode
    (JornalCode: Mandatory.
The type of this journal should be Periodic-costing and it should be in a management or official layer)
input iiPostingYear
    (PostingYear: Mandatory. accounting-year format 9999)
input iiPostingPeriod
    (PostingPeriod: Mandatory. accounting-period format 99)
input ilOnlyReverseUnreversedOnes
    (OnlyReverseUnreversedOnes: 
Pass true in case you only want to reverse postings that have not yet been reversed or that are no reversals of other postings.
Pass false in case you just want to reverse all postings matching the filter regardless their reversal-properties)
input ilReversalByCorrection
    (ReversalByCorrection;
Pass true in case debit of the reversal posting should be the credit of the reversed posting (and vice versa)
Pass true in case debit and credit of the reversal posting should be the same as the debit and credit of the reversed posting but multiplied by -1)
output dataset tApiPeriodicCostingPostings
    (Output temp-table holding the main references on the postings that are reversed by this method.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiMassReversePeriodicCostingPostings.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiMassReversePeriodicCostingPostings.after:

END PROCEDURE.
**/

/*
Procedure: ApiMassReversePeriodicCostingPostingsByDomain
Description:
ApiMassReversePeriodicCostingPostingsByDomain; this api-method is called from the Periodic-costing module to reverse a bunch of postings of a certain company, journal (type periodic costing and layer official or management) and period.
The method returns a temp-table holding the main info of the postings that are reversed.
Parameters:
input icDomainCode
    (DomainCode: Mandatory.
This should be the current domain)
input icJournalCode
    (JornalCode: Mandatory.
The type of this journal should be Periodic-costing and it should be in a management or official layer)
input iiPostingYear
    (PostingYear: Mandatory. accounting-year format 9999)
input iiPostingPeriod
    (PostingPeriod: Mandatory. accounting-period format 99)
input ilOnlyReverseUnreversedOnes
    (OnlyReverseUnreversedOnes: 
Pass true in case you only want to reverse postings that have not yet been reversed or that are no reversals of other postings.
Pass false in case you just want to reverse all postings matching the filter regardless their reversal-properties)
input ilReversalByCorrection
    (ReversalByCorrection;
Pass true in case debit of the reversal posting should be the credit of the reversed posting (and vice versa)
Pass true in case debit and credit of the reversal posting should be the same as the debit and credit of the reversed posting but multiplied by -1)
output dataset tApiPeriodicCostingPostings
    (Output temp-table holding the main references on the postings that are reversed by this method.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiMassReversePeriodicCostingPostingsByDomain.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiMassReversePeriodicCostingPostingsByDomain.after:

END PROCEDURE.
**/

/*
Procedure: ApiStdMaintainMultiTT
Description:
ApiStdMaintainMultiTT: Same as ApiStdMaintainTT except that all input main-tables are handled in a single transaction.
Note that the Remoting-flag has been turned on because this method is called from the JE-ExcelIntegration on the client.
Parameters:
input dataset tApiPosting
    (Input table containing the postings)
input dataset tApiPostingLine
    (Input table containing the posting-lines)
input dataset tApiPostingSaf
    (Input table containing the posting-safs of a posting-line)
input dataset tApiPostingVat
    (Input table containing the PostingVat)
input dataset tApiPostingVatDelay
    (Input table containing the PostingVatDelay)
input icAction
    (SAVE
SAVESTORE 
STORE     
VALIDATE)
output ocLstPrimKey
    (LstPrimKey
Char4 separated list with the primary keys of the newly created main-table records. The fields of a primkey are separated with Char2.
E.g. 1<Char2>2002<Char2>100<Char4>1<Char2>2002<Char2>101)
output ocLstReturn
    (LstReturn
Char4 separated list with the return-status of the newly created main-table records. Zero means no errors occured.
E.g. 0<Char4>-1<Char4>-504<Char4>1<Char4>0)
output ocLstRowid
    (LstRowid
Char4 separated list with the temporarely rowids (negative for new ones) of the newly created main-table records. .
E.g. 
-1<Char2>aox00098001<Char2>-26)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiStdMaintainMultiTT.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiStdMaintainMultiTT.after:

END PROCEDURE.
**/

/*
Procedure: ApiStdMaintainTT
Description:
ApiStdMaintainTT; Method that allows the creation of new instances based on the content of the input temp-tables.
Parameters:
input dataset tApiPosting
    (Input table containing the postings)
input dataset tApiPostingLine
    (Input table containing the posting-lines)
input dataset tApiPostingSaf
    (Input table containing the posting-safs of a posting-line)
input dataset tApiPostingVat
    (Input table containing the PostingVat)
input dataset tApiPostingVatDelay
    (Input table containing the PostingVatDelay)
input icAction
    (SAVE
SAVESTORE 
STORE     
VALIDATE)
output ocLstPrimKey
    (LstPrimKey
Char4 separated list with the primary keys of the newly created main-table records. The fields of a primkey are separated with Char2.
E.g. 1<Char2>2002<Char2>100<Char4>1<Char2>2002<Char2>101)
output ocLstReturn
    (LstReturn
Char4 separated list with the return-status of the newly created main-table records. Zero means no errors occured.
E.g. 0<Char4>-1<Char4>-504<Char4>1<Char4>0)
output ocLstRowid
    (LstRowid
Char4 separated list with the temporarely rowids (negative for new ones) of the newly created main-table records. .
E.g. 
-1<Char2>aox00098001<Char2>-26)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiStdMaintainTT.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiStdMaintainTT.after:

END PROCEDURE.
**/

/*
Procedure: ApiStdMaintainTTCreatetApiSafFromPosting
Description:
ApiStdMaintainTTCreatetApiSafFromPosting: method that will create tApiSafFromPosting records for every SAF that is used in the postings of the current instance so they can be used to create these SAFs in the db later on in the flow
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiStdMaintainTTCreatetApiSafFromPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiStdMaintainTTCreatetApiSafFromPosting.after:

END PROCEDURE.
**/

/*
Procedure: ApiStdMaintainTTDefaulting
Description:
This method is called when creating a posting through an API.  It is used to default field values to the incoming dataset prior to validation and saving.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiStdMaintainTTDefaulting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiStdMaintainTTDefaulting.after:

END PROCEDURE.
**/

/*
Procedure: ApiStdMaintainTTInitialDefaulting
Description:
ApiStdMaintainTTInitialDefaulting: This method is called when creating a posting through an API right before the processing of the input.  
This method can be used to default field values to the incoming dataset prior to the acctual processing.

Standard-defaulting in this method:
•	Default Company_ID with the current company you are logged on to
•	Default PostingDate with PostingSystemDate  (and vice-versa so one of them is mandatory).
•	Default CInvoiceTaxPointDate with CInvoicePostingDate 
•	Default PostingYearPeriod based upon PostingYear and PostingPeriod (and vice-versa)
•	Default PostingYearPeriod, PostingYear and PostingPeriod based upon PostingDate 
•	Default PostingText based upon PostingYear, tcJournalCode, PostingVoucher and the date and time + " " +.
•	Default PostingLineSequence with a sequential value and ordered by tc_rowid
•	Default  PostingLineText with PostingText
•	Default tcDivisionCode, tcCostCentreCode and tcProjectCode in the posting-lines based upon the defaults of the GL-account on the PostingLine
•	Default GLIsAutomaticAccount, GLIsDebitAAccount, GLTypeCode and UnitCode based upon the GL-account on the PostingLine (even in case these fields are already filled by the caller)
•	Default PostingVat.PostingVatTaxDebitTC and DInvoiceVat.PostingVatTaxCreditTC with fields PostingLineDebitTC and PostingLineCreditTC of the parent-record in PostingLine
•	Default PostingVaT.tcDomainCode based upon the current domain
•	Default PostingVatTaxPointDate with PostingDate
•	Default PostingVat.PostingVatInOut with tApiPostingVat.tcVatInOut (and vice versa)
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiStdMaintainTTInitialDefaulting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiStdMaintainTTInitialDefaulting.after:

END PROCEDURE.
**/

/*
Procedure: ApiStdMaintainTTSub1
Description:
ApiStdMaintainTTSub1; Sub-method of ApiStdMaintainTT
Parameters:
input icAction
    ()
input-output bcLstReturn
    ()
input-output bcLstPrimKey
    ()
input-output bcLstRowid
    ()
input-output blSaveAsDraft
    ()
input-output blQStartedVatRuleByVatIDCode
    (QStartedVatRuleByVatIDCode: true in case query VatRuleByVatIDCode is started alreay)
input-output blQStartedGetSafConceptsForStr
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiStdMaintainTTSub1.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiStdMaintainTTSub1.after:

END PROCEDURE.
**/

/*
Procedure: ApiStdMaintainTTSub11
Description:
Sub-method of ApiStdMaintainTTSub1
Parameters:
input-output blQStartedGetSafConceptsForStr
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiStdMaintainTTSub11.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiStdMaintainTTSub11.after:

END PROCEDURE.
**/

/*
Procedure: CalcCrossCompanyBusinessRelation
Description:
Calculate cross company business relation code
Parameters:
input igCrossCompanyId
    ()
input icCrossCompanyCode
    (CrossCompanyCode: this paramater is only used in case parameter CrossCompanyID is zero.)
output ocBusinessRelationICCode
    (BusinessRelationICCode)
output ogBusinessRelationId
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.CalcCrossCompanyBusinessRelation.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CalcCrossCompanyBusinessRelation.after:

END PROCEDURE.
**/

/*
Procedure: CalculateCCAmount
Description:
Procedure for calculating consolidated currency amounts of posting
Parameters:
input igCompanyID
    ()
input idPostingLineCreditLC
    ()
input idPostingLineCreditTC
    ()
input idPostingLineDebitLC
    ()
input idPostingLineDebitTC
    ()
input itPostingDate
    ()
input icCurrencyCode
    ()
input itInvoiceExchangeRateDate
    (If this is set, then it will be used as the date to calculate the exchange rate - set according to flag on entity)
input-output bdCCExchangeRate
    ()
input-output bdCCExchangeRateScale
    ()
input-output blCurrencyFetched
    ()
output odPostingLineCreditCC
    ()
output odPostingLineDebitCC
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.CalculateCCAmount.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CalculateCCAmount.after:

END PROCEDURE.
**/

/*
Procedure: CalculateCrossCy
Description:
CalculateCrossCy
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.CalculateCrossCy.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CalculateCrossCy.after:

END PROCEDURE.
**/

/*
Procedure: CalculateOpenItems
Description:
Lookup open item references
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.CalculateOpenItems.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CalculateOpenItems.after:

END PROCEDURE.
**/

/*
Procedure: CalculatePostingSaf
Description:
Calculate the PostingSaf table based on CostCentreCode and ProjectCode.
Parameters:
input icPostingLineRowid
    ()
input igPostingId
    (PostingLine.Posting_ID)
input igCompanyId
    (Internal ID of the active company.)
input igGLId
    ()
input icGLCode
    ()
input igCostCentreId
    ()
input icCostCentreCode
    ()
input igProjectId
    ()
input icProjectCode
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.CalculatePostingSaf.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CalculatePostingSaf.after:

END PROCEDURE.
**/

/*
Procedure: CheckCrDbAmountsForRealizedProfitLossAccounts
Description:
CheckCrDbAmountsForRealizedProfitLossAccounts; this method will verify whether the business-instance contains any undeleted posting that has got ane undeleted posting-line on an account of system-type 'Realised-Exch-Gain' with a debit value filled or of system-type 'Realised-Exch-Loss' with credit-value filled.
If this is the case then an error will be raised.

This method should normally only be called from within the OpenItemAdj class as this validation is only apllicable there. In other kinds of postings, it can be allowed to have the credit/debit fields filled regardless the system-type of the account.
Parameters:
input igPostingID
    (If this is filled, then the check will only be performed against that posting. If this is empty, then the check will be done for all postings in the business-instance.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.CheckCrDbAmountsForRealizedProfitLossAccounts.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CheckCrDbAmountsForRealizedProfitLossAccounts.after:

END PROCEDURE.
**/

/*
Procedure: CheckIsDomainWithCOAMask
Description:
check whether to validate coa mask. 
true: need to run coa mask validateion.
false: not need.
Parameters:
input igCompanyId
    ()
input igDomainId
    ()
output olIsWithCOAMask
    (default: false.
true: if any type of COA mask is checked in the domain settings.)
output olIsCOAMaskDiv
    ()
output olIsCOAMaskDivAll
    ()
output olIsCOAMaskCC
    ()
output olIsCOAMaskCCAll
    ()
output olIsCOAMaskProj
    ()
output olIsCOAMaskProjAll
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.CheckIsDomainWithCOAMask.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CheckIsDomainWithCOAMask.after:

END PROCEDURE.
**/

/*
Procedure: CheckIsDomainWithWHT
Description:
Parameters:
input igCompanyID
    ()
output olIsDomainWithWHT
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.CheckIsDomainWithWHT.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CheckIsDomainWithWHT.after:

END PROCEDURE.
**/

/*
Procedure: CreatePostingsFromImport
Description:
Method to add a set of new posting entries into the current instance. It works as buffer-copy. A vantage is that validations can be run only once after all records are added.
Parameters:
input-output dataset tApiPosting
    ()
input dataset tApiPostingLine
    ()
input dataset tApiPostingSaf
    ()
input dataset tApiPostingVat
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.CreatePostingsFromImport.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CreatePostingsFromImport.after:

END PROCEDURE.
**/

/*
Procedure: CreateRoundingPosting
Description:
This method can be used for automatic creation of rounding posting, which will balance a posting.
Parameters:
input icPostingRowID
    ()
output ogPostingLineID
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.CreateRoundingPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CreateRoundingPosting.after:

END PROCEDURE.
**/

/*
Procedure: DataLoadByInputSafDefaulting
Description:
DataLoadByInputSafDefaulting: submethod of DataLoadByInput that will handle the defaulting of the safs. 
Make sure this method and its caller are in the same segment
Parameters:
input-output blQStartedGetSafConceptsForStr
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.DataLoadByInputSafDefaulting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataLoadByInputSafDefaulting.after:

END PROCEDURE.
**/

/*
Procedure: DataLoadByInputVatRule
Description:
Set the VatRule for the tPostingVat record
Parameters:
input-output blQStartedVatRuleByVatIDCode
    (Logical to store whether this query has been started)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.DataLoadByInputVatRule.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataLoadByInputVatRule.after:

END PROCEDURE.
**/

/*
Procedure: DataLoadMirrorPosting
Description:
This method is used to read counter part of mirroring posting for all postings, which are already read in the insance of the component.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.DataLoadMirrorPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataLoadMirrorPosting.after:

END PROCEDURE.
**/

/*
Procedure: DeletePosting
Description:
Delete a already loaded posting
Parameters:
input icPostingRowId
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.DeletePosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DeletePosting.after:

END PROCEDURE.
**/

/*
Procedure: GetAdditionalNbr
Description:
Parameters:
input igCompanyId
    ()
input igPostingId
    ()
output oiPostingAddGLNbr
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetAdditionalNbr.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetAdditionalNbr.after:

END PROCEDURE.
**/

/*
Procedure: GetBaseAndStatCurrecyByCompanyID
Description:
Get base currency and statutory currency by company_id.
Parameters:
input igCompanyID
    ()
output ocBaseCurrencyCode
    (Base Currency Code.)
output ocStatutoryCurrencyCode
    (Statutory Currency Code.)
output ogBaseCurrency_ID
    ()
output ogStatutoryCurrency_ID
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetBaseAndStatCurrecyByCompanyID.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetBaseAndStatCurrecyByCompanyID.after:

END PROCEDURE.
**/

/*
Procedure: GetCIRECPostingLineID
Description:
Get CIREC PostingLineID
Parameters:
input igPostingId
    (PostingID)
output ogCIRECPostingLineId
    (CIREC Posting Line ID)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetCIRECPostingLineID.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetCIRECPostingLineID.after:

END PROCEDURE.
**/

/*
Procedure: GetCrossCyPostingLines
Description:
Returns the cross company posting lines of this instance
Parameters:
output dataset tApiPostingLine
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetCrossCyPostingLines.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetCrossCyPostingLines.after:

END PROCEDURE.
**/

/*
Procedure: GetDataForOpPosting
Description:
This method is used to retrieve information required by the Operational Posting Program
Parameters:
output dataset tApiDomainInfo
    ()
output dataset tApiDomainPropertyInfo
    ()
output ocSysPropertyCurrencyCode
    ()
output dataset tApiAccountInfo
    ()
output dataset tApiPostingDataIsWithSaf
    (This parameter returns a temp-table holding all the GL, Project and Cost Centre codes which uses SAFs to the call program.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetDataForOpPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetDataForOpPosting.after:

END PROCEDURE.
**/

/*
Procedure: GetInstanceData
Description:
This method provides copy of data used by instance
Parameters:
output dataset tApiPosting
    ()
output dataset tApiPostingLine
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetInstanceData.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetInstanceData.after:

END PROCEDURE.
**/

/*
Procedure: GetPostingActionsBasedOnPostingID
Description:
GetPostingActionsBasedOnPostingID
Parameters:
input igPostingID
    ()
output olPostingIsCreatedChangedDeleted
    (PostingIsCreatedChangedDeleted: this parameter is true in case any of the class-tables has a ctatus <> empty)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPostingActionsBasedOnPostingID.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPostingActionsBasedOnPostingID.after:

END PROCEDURE.
**/

/*
Procedure: GetPostingIDBasedOnPostingRowid
Description:
Get the Posting_ID based on the posting-rowid. This convertion is done on the instance-data; this functionality will only work for loaded are newly added instances.
Parameters:
input icPostingRowid
    (Rowid of the posting)
output ogPostingID
    (PostingID)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPostingIDBasedOnPostingRowid.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPostingIDBasedOnPostingRowid.after:

END PROCEDURE.
**/

/*
Procedure: GetPostingIDsForXLSIntegration
Description:
GetPostingIDsForXLSIntegration:
This method returns a Posting_ID for every record in the input-output temp-table. For those postings that do not yet exists in the db and for those who are already in the db, based on the logical key of a posting. 
These new values for PostingIDs are just retrieved from the persistence-layer and are not yet used to store anything in the database.
For the existing records, the returned Posting_ID is just the one as it is in the db.
Parameters:
input-output dataset tPostingForXLS
    (Temp-table used for the Excel-integration so that at the moment an xls-sheet is loaded onto the grid, the Posting_ID gets set for the postings in the xls-sheet that do not yet exist in the FInancials-db or that already exist.
The temp-table returns a value in field NewPostingID for every record  in the temp-table based on the logical key of a posting.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPostingIDsForXLSIntegration.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPostingIDsForXLSIntegration.after:

END PROCEDURE.
**/

/*
Procedure: GetPostingLayerTypeCode
Description:
add new method : GetPostingLayerTypeCode
Parameters:
input igPostingId
    (Posting ID)
output ocPostingLayerTypeCode
    (Layer Type Code)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPostingLayerTypeCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPostingLayerTypeCode.after:

END PROCEDURE.
**/

/*
Procedure: GetPostingLineDataForPosting
Description:
GetPostingLineDataForPosting: this method will return some minimal information on the postinglines of a certain posting
Parameters:
input icPostingTcRowid
    (PostingTcRowid; tc_rowid of the posting:
If a value is passed for this parameter then parameter iiPostingID is of no use)
input igPostingID
    (PostingID; _ID of the posting:
If a value is passed for parameter icPostingTcRowid then this parameter is of no use)
output dataset tPostingLineMinimalData
    (temp-table holding some elementary fields of the postinglines)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPostingLineDataForPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPostingLineDataForPosting.after:

END PROCEDURE.
**/

/*
Procedure: GetPostingLineRowidBasedOnPostingLineID
Description:
Add method to retrieve the PostingLineRowid based on the ID
Parameters:
input igPostingLineID
    ()
output ocPostingLineRowid
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPostingLineRowidBasedOnPostingLineID.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPostingLineRowidBasedOnPostingLineID.after:

END PROCEDURE.
**/

/*
Procedure: GetPostingNumber
Description:
get a value for tPosting.PostingVoucher
Parameters:
input ictcRowid
    (value of tPosting.tc_Rowid)
input iiYear
    (Current selected accounting year for posting)
input icJournalCode
    (Current selected journal for posting)
output oiVoucher
    (value for tPosting.PostingVoucher)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPostingNumber.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPostingNumber.after:

END PROCEDURE.
**/

/*
Procedure: GetPostingRowidBasedOnPostingID
Description:
Parameters:
input igPostingID
    ()
output ocPostingRowid
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPostingRowidBasedOnPostingID.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPostingRowidBasedOnPostingID.after:

END PROCEDURE.
**/

/*
Procedure: GetPostingTemplateBasedCode
Description:
This method returns informatin about posting template based on template code
Parameters:
input-output bcPostingTemplateCode
    ()
output ocDescription
    ()
output ocDivisionCode
    ()
output ocProjectCode
    ()
output ocCostCentreCode
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPostingTemplateBasedCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPostingTemplateBasedCode.after:

END PROCEDURE.
**/

/*
Procedure: GetPostingVatID
Description:
Parameters:
input icDomainCode
    ()
input icTxclTaxCls
    ()
input icTxenvTaxEnv
    ()
input icTxuTaxUsage
    ()
input icVatCode
    ()
input icVatInOut
    ()
input igPostingID
    ()
output ogPostingVatID
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPostingVatID.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPostingVatID.after:

END PROCEDURE.
**/

/*
Procedure: GetPostingVatVatGroup
Description:
GetPostingVatVatGroup: this method will receive a bunch of paramaters and decide in its program-code, which VatGroup shoudl be used on a certain combination of input paramater values
Parameters:
input icJournalTypeCode
    (Type of the Journal that is statedin the header ofthe posting (mandatory).)
input icVatCode
    (Vat-code that is stated in the taxes of the posting-vat record (mandatory).)
input iiVatRuleSequence
    (VatRule-sequence that is stated in the taxes of the posting-vat record (mandatory).)
input igInvoiceVatGroupID
    (InvocieVatGroupID: corresponds with field InvoiceVatGroup_ID of the appropriate VatRule-record of the VatCode-record.)
input igCreditNoteVatGroupID
    (CreditNoteVatGroupID: corresponds with field CreditNoteVatGroup_ID of the appropriate VatRule-record of the VatCode-record.)
input igAbsorbedInvoiceVatGroupID
    (AbsorbedInvoiceVatGroupID: corresponds with field AbsorbedInvoiceVatGroup_ID of the appropriate VatRule-record of the VatCode-record.)
input igAbsorbedCreditNVatGroupID
    (AbsorbedCreditNVatGroupID: corresponds with field AbsorbedCreditNVatGroup_ID of the appropriate VatRule-record of the VatCode-record.)
input igRetainVoucherVatGroupID
    (RetainVoucherVatGroupID: corresponds with field RetainVoucherVatGroup_ID of the appropriate VatRule-record of the VatCode-record.)
input igRetainCVoucherVatGroupID
    (RetainCVoucherVatGroupID: corresponds with field RetainCVoucherVatGroup_ID of the appropriate VatRule-record of the VatCode-record.)
input ilVatIsAbsorbed
    (VatIsAbsorbed: mandatory information comming from the Vat-definition)
input ilVatIsRetained
    (VatIsRetained: mandatory information comming from the Vat-definition)
input iiPostingYear
    (Optional parameter used to raise error-messages)
input iiPostingVoucher
    (Optional parameter used to raise error-messages)
input iiPostingLineSequence
    (Optional parameter used to raise error-messages)
input icPostingLineGLCode
    (Optional parameter used to raise error-messages)
input icPostingVatTcRowid
    (Optional: tc_rowid of the PostingVat-record (only used for messaging))
output ogDeterminedVatGroupID
    (DeterminedVatGroupID: this will be the VatGroup_ID to be used for a certain PostingVat-based upon all the input information)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPostingVatVatGroup.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPostingVatVatGroup.after:

END PROCEDURE.
**/

/*
Procedure: GetSafStructureForCostCentre
Description:
Get the SAF Structure associated with Cost Centre
Parameters:
input igCompanyId
    ()
input igGLId
    ()
input icGLCode
    ()
input igCostCentreId
    ()
input icCostCentreCode
    ()
output ogSafStructureId
    ()
output ocSafStructureCode
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetSafStructureForCostCentre.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetSafStructureForCostCentre.after:

END PROCEDURE.
**/

/*
Procedure: GetSafStructureForProject
Description:
Returns the SAF structure ID and code for the specified project.
Parameters:
input igCompanyId
    ()
input igGLId
    ()
input icGLCode
    ()
input igProjectId
    ()
input icProjectCode
    ()
output ogSafStructureId
    ()
output ocSafStructureCode
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetSafStructureForProject.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetSafStructureForProject.after:

END PROCEDURE.
**/

/*
Procedure: MassDeletePeriodicCostingPostings
Description:
MassDeletePeriodicCostingPostings; this api-method is called from the Periodic-costing module to delete a bunch of postings of a certain company, journal (type periodic costing) and period.
The method returns a temp-table holding the main info of the postings that are deleted.
Parameters:
input icCompanyCode
    (CompanyCode: Mandatory.
This should be the current company)
input icJournalCode
    (JornalCode: Mandatory.
The type of this journal should be Periodic-costing)
input iiPostingYear
    (PostingYear: Mandatory. accounting-year format 9999)
input iiPostingPeriod
    (PostingPeriod: Mandatory. accounting-period format 99)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MassDeletePeriodicCostingPostings.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MassDeletePeriodicCostingPostings.after:

END PROCEDURE.
**/

/*
Procedure: MassReversePeriodicCostingPostings
Description:
MassReversePeriodicCostingPostings; this method is called from the Periodic-costing module to reverse a bunch of postings of a certain company, journal (type periodic costing and layer official or management) and period.
The method returns a temp-table holding the main info of the postings that are reversed.
Parameters:
input icCompanyCode
    (CompanyCode: Mandatory.
This should be the current company)
input icJournalCode
    (JornalCode: Mandatory.
The type of this journal should be Periodic-costing and it should be in a management or official layer)
input iiPostingYear
    (PostingYear: Mandatory. accounting-year format 9999)
input iiPostingPeriod
    (PostingPeriod: Mandatory. accounting-period format 99)
input ilOnlyReverseUnreversedOnes
    (OnlyReverseUnreversedOnes: 
Pass true in case you only want to reverse postings that have not yet been reversed or that are no reversals of other postings.
Pass false in case you just want to reverse all postings matching the filter regardless their reversal-properties)
input ilReversalByCorrection
    (ReversalByCorrection;
Pass true in case debit of the reversal posting should be the credit of the reversed posting (and vice versa)
Pass true in case debit and credit of the reversal posting should be the same as the debit and credit of the reversed posting but multiplied by -1)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MassReversePeriodicCostingPostings.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MassReversePeriodicCostingPostings.after:

END PROCEDURE.
**/

/*
Procedure: MyDataLoad
Description:
MyDataLoad
Parameters:
input igCompanyId
    ()
input iiPeriodYear
    (PeriodYear)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MyDataLoad.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MyDataLoad.after:

END PROCEDURE.
**/

/*
Procedure: PostSaveDynamicCreations
Description:
PostSaveDynamicCreations: submethod of the inheritted method PostSave that will create the QPostingLine and QPostingSaf records based upon temp-tables
Parameters:
output oiNbrOfCreatedQPostingLine
    (QPostingLinesCreated: Returns the number of QPostingLine records that are created)
output oiNbrOfCreatedQPostingSaf
    (QPostingSafsCreated: Returns the number of QPostingSaf records that are created)
output oiNbrOfCreatedQBudgetLinkActual
    (Number of QBudgetLinkActual-records that are created)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.PostSaveDynamicCreations.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.PostSaveDynamicCreations.after:

END PROCEDURE.
**/

/*
Procedure: PreSaveAutoBalNotifMailSend
Description:
Send notification mail with detauls about postings for which auto-balancing posting was created.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.PreSaveAutoBalNotifMailSend.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.PreSaveAutoBalNotifMailSend.after:

END PROCEDURE.
**/

/*
Procedure: PreSaveValidate
Description:
Execute some extra validataions to ensure, there is not corrupted database
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.PreSaveValidate.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.PreSaveValidate.after:

END PROCEDURE.
**/

/*
Procedure: RemoveEmptyNewPostingLines
Description:
remove the empty postinglines from the postings identified by the input parameter
Parameters:
input icListPostingIDs
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.RemoveEmptyNewPostingLines.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.RemoveEmptyNewPostingLines.after:

END PROCEDURE.
**/

/*
Procedure: RemovePostingFromInstance
Description:
remove the posting from the instance : delete posting and postinglines and also release the number
Parameters:
input igPostingID
    (ID of the posting to be deleted from instance)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.RemovePostingFromInstance.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.RemovePostingFromInstance.after:

END PROCEDURE.
**/

/*
Procedure: SetBPostingIsStartedFromBYrClose
Description:
Sets whether the Posting component is started from the YearClosing component.
Parameters:
input ilBPostingIsStartedFromBYrClose
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.SetBPostingIsStartedFromBYrClose.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetBPostingIsStartedFromBYrClose.after:

END PROCEDURE.
**/

/*
Procedure: SetNumberingDate
Description:
Set numbering date
Parameters:
input igPostingID
    ()
input itNbrDate
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.SetNumberingDate.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetNumberingDate.after:

END PROCEDURE.
**/

/*
Procedure: SetPostingInvoiceReferenceTxt
Description:
Method that allows to set the PostingInvoiceReferenceTxt for a posting that is already loaded in the instance
Parameters:
input icPostingTcRowID
    (Posting Row ID)
input igPostingID
    (Posting ID)
input icPostingInvoiceReferenceTxt
    (Vlaue to set for PostingInvoiceReferenceTxt)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.SetPostingInvoiceReferenceTxt.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetPostingInvoiceReferenceTxt.after:

END PROCEDURE.
**/

/*
Procedure: SetPostingIsZeroValueAllowed
Description:
here you can update this field to make it possible to create zero postings
Parameters:
input icPostingRowId
    (Posting Row ID)
input igPostingId
    (Posting ID)
input ilPostingIsZeroValueAllowed
    (Posting Is Zero Value Allowed Flag)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.SetPostingIsZeroValueAllowed.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetPostingIsZeroValueAllowed.after:

END PROCEDURE.
**/

/*
Procedure: SetPostingLineLegalDocNumber
Description:
Method can be used for the assignment of the Legal document number for Posting Line
Parameters:
input icPostingLineTcRowID
    (Posting Row ID)
input igPostingLineID
    (Posting ID)
input icLegalDocumentNumber
    (Vlaue to set for PostingInvoiceReferenceTxt)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.SetPostingLineLegalDocNumber.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetPostingLineLegalDocNumber.after:

END PROCEDURE.
**/

/*
Procedure: SetPostingOriginAddressCode
Description:
Method that allows to set the PostingOriginAddressCode for a posting that is already loaded in the instance
Parameters:
input icPostingTcRowID
    ()
input igPostingID
    ()
input icPostingOriginAddressCode
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.SetPostingOriginAddressCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetPostingOriginAddressCode.after:

END PROCEDURE.
**/

/*
Procedure: StdMaintainTT
Description:
StdMaintainTT; Method that allows the creation of new instances based on the content of the input temp-tables WITHOUT ValidateBC, AddUpd and DataSave
Parameters:
input dataset tApiPosting
    (Input table containing the postings)
input dataset tApiPostingLine
    (Input table containing the posting-lines)
input dataset tApiPostingSaf
    (Input table containing the posting-safs of a posting-line)
input dataset tApiPostingVat
    (Input table containing the PostingVat)
input dataset tApiPostingVatDelay
    (Input table containing the PostingVatDelay)
input icAction
    (SAVE
SAVESTORE 
STORE     
VALIDATE)
output ocLstPrimKey
    (LstPrimKey
Char4 separated list with the primary keys of the newly created main-table records. The fields of a primkey are separated with Char2.
E.g. 1<Char2>2002<Char2>100<Char4>1<Char2>2002<Char2>101)
output ocLstReturn
    (LstReturn
Char4 separated list with the return-status of the newly created main-table records. Zero means no errors occured.
E.g. 0<Char4>-1<Char4>-504<Char4>1<Char4>0)
output ocLstRowid
    (LstRowid
Char4 separated list with the temporarely rowids (negative for new ones) of the newly created main-table records. .
E.g. 
-1<Char2>aox00098001<Char2>-26)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.StdMaintainTT.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.StdMaintainTT.after:

END PROCEDURE.
**/

/*
Procedure: StdMaintainTTSub1
Description:
ApiStdMaintainTTSub1; Sub-method of ApiStdMaintainTT  WITHOUT Validate, AddUpd and Datasave
Parameters:
input icAction
    ()
input-output bcLstReturn
    ()
input-output bcLstPrimKey
    ()
input-output bcLstRowid
    ()
input-output blSaveAsDraft
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.StdMaintainTTSub1.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.StdMaintainTTSub1.after:

END PROCEDURE.
**/

/*
Procedure: StdMaintainTTSub11
Description:
Sub-method of ApiStdMaintainTTSub1 : WITHOUT Validate, AddUpd and DataSave
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.StdMaintainTTSub11.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.StdMaintainTTSub11.after:

END PROCEDURE.
**/

/*
Procedure: UpdateCrossCompanyIDs
Description:
Methods which takes in the cross company id's and updates it's posting line table
Parameters:
input dataset tApiPostingLine
    (Posting line which contains the cross company posting id's)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.UpdateCrossCompanyIDs.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.UpdateCrossCompanyIDs.after:

END PROCEDURE.
**/

/*
Procedure: UpdateCrossCompanyInfo
Description:
UpdateCrossCompanyInfo
Parameters:
input igPostingCompanyID
    (PostingCompanyID)
input igPostingID
    (PostingID)
input igPostingLineID
    (PostingLineId)
input igCrossCompanyID
    (CrossCompanyID)
input igCrossCompanyPostingID
    (CrossCompanyPostingID)
input igCrossCompanyPostingLineID
    (CrossCompanyPostingLineID)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.UpdateCrossCompanyInfo.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.UpdateCrossCompanyInfo.after:

END PROCEDURE.
**/

/*
Procedure: UpdateInvoiceNumbers
Description:
When domain is using consecutive invoice numbering, then a temporary number was used to create the posting.  All occurences of this number will be changed with the correct permanent number at moment of presave of the invoice.
Parameters:
input dataset tUpdateInvoiceNumbersPosting
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.UpdateInvoiceNumbers.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.UpdateInvoiceNumbers.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPost
Description:
Validation methods that need to be run after Ancestor tag
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPost.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPost.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostCheckLayer
Description:
Validate if a posting can be changed in this layer
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostCheckLayer.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostCheckLayer.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostCrossCompany
Description:
ValidateComponentPostCrossCompany
Parameters:
input-output blQueryStartedJournalByJournal
    ()
input-output blQueryStartedCompanyPrim
    ()
input-output blQueryStartedGLByCyBR
    ()
input-output blQueryStartedCompanyProperty
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostCrossCompany.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostCrossCompany.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostCrossCompanyDeleteConstraint
Description:
Delete constraint on cross company postings.  (These constraints are not automatically generated, as we need to be able to by-pass them if the linked posting is being deleted in the same transaction).
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostCrossCompanyDeleteConstraint.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostCrossCompanyDeleteConstraint.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostJournalRole
Description:
Validates the user can post to the journal they are attempting to post to.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostJournalRole.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostJournalRole.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostPeriodJournalClosed
Description:
Validates whether a posting can be made, the posting should be blocked if the daybook belongs to a daybook mask applied to the period.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostPeriodJournalClosed.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostPeriodJournalClosed.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostPosting1
Description:
Validate Component after ancestor class - Posting validations - part 1
Parameters:
input-output blQueryStartedCompPropByCode
    ()
input-output blQueryStartedCompanyPrim
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostPosting1.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostPosting1.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostPosting2
Description:
Validate Component after ancestor tag: Validations for Posting Header (part 2)
Parameters:
input-output blQueryStartedPostingTemplate
    ()
input-output blQueryStartedPeriodById
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostPosting2.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostPosting2.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostPostingLine1
Description:
Validate Component After ancestor tag for posting lines.
Parameters:
input-output blQueryStartedGLByID
    ()
input-output blQueryStartedProjectById
    ()
input-output blQueryStartedCostCentreByID
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostPostingLine1.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostPostingLine1.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostPostingLine2
Description:
ValidatePostingLine
Parameters:
input-output blQueryStartedGLByPosting
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostPostingLine2.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostPostingLine2.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostPostingLine3
Description:
ValidatePostingLine
Parameters:
input ilPostingIsYearClosing
    ()
input-output blQueryStartedGLForPostingLine
    ()
input-output blQueryStartedGetCostCentre
    ()
input-output blQueryStartedGetProject
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostPostingLine3.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostPostingLine3.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostPostingLine4
Description:
Parameters:
input-output blQueryStartedGLOpenItemByAll
    ()
input-output blClassStartedAndOpenedBCOAMask
    (ClassStartedAndOpenedBCOAMask)
input-output blCheckCOAMaskForThisPosting
    (This parameter indicates if the GLMask needs to be checked for the company of the posting)
input-output blDomainIsWithCOAMask
    ()
input-output blDomainIsCOAMaskDiv
    ()
input-output blDomainIsCOAMaskDivAll
    ()
input-output blDomainIsCOAMaskCC
    ()
input-output blDomainIsCOAMaskCCAll
    ()
input-output blDomainIsCOAMaskProj
    ()
input-output blDomainIsCOAMaskProjAll
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostPostingLine4.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostPostingLine4.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostPostingSaf
Description:
Validate Component after ancestor tag for posting saf records.
Parameters:
input-output blQueryStartedSafConceptByCode
    ()
input-output blQueryStartedSafStructureLine
    ()
input-output bcPostingSafParentType
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostPostingSaf.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostPostingSaf.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostRounding
Description:
Check rounding on all amounts
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostRounding.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostRounding.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPostStopQueries
Description:
Stop the queries that were used in ValidateComponentPost method + sub-methods.
Parameters:
input ilQueryStartedJournalByJournal
    ()
input ilQueryStartedGLByID
    ()
input ilQueryStartedProjectById
    ()
input ilQueryStartedCostCentreByID
    ()
input ilQueryStartedPostingTemplate
    ()
input ilQueryStartedPeriodByID
    ()
input ilQueryStartedGLByPosting
    ()
input ilQueryStartedGLOpenItemByAll
    ()
input ilQueryStartedSafConceptByCode
    ()
input ilQueryStartedSafStructureLine
    ()
input ilQueryStartedCompanyPrim
    ()
input ilQueryStartedGLByCyBR
    ()
input ilQueryStartedCompanyProperty
    ()
input ilQueryStartedCompPropByCode
    ()
input ilQueryStartedGLForPostingLine
    ()
input ilQueryStartedGetCostCentre
    ()
input ilQueryStartedGetProject
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPostStopQueries.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPostStopQueries.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPre
Description:
Validations that need to be done before ANCESTOR CODE.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPre.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPre.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPreAssignPosting1
Description:
Validations & Assignments on t_sPosting before ancestor tag
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPreAssignPosting1.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPreAssignPosting1.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPreAssignPostingLine
Description:
Validate Component before Ancestor Tag - Fill fields in PostingLine (assign tcCurrencyCode, round LC amounts, ...)
Parameters:
input-output bcCurrencyCode
    ()
input-output blCurrencyFetched
    ()
input-output bdExchangeRate
    (ExchangeRate - if set for currency reuse that amount so we don't have to retrive currency again)
input-output bdExchangeRateScale
    (ExchangeRateScale - if set for currency reuse that amount so we don't have to retrive currency again)
input-output bdCCExchangeRate
    ()
input-output bdCCExchangeRateScale
    ()
input ilIsBCInvoiceNeeded
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPreAssignPostingLine.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPreAssignPostingLine.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPreAssignPostingLineCross
Description:
This method establishes relation between two cross company postings created from the operational.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPreAssignPostingLineCross.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPreAssignPostingLineCross.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPreAssignPostingVat
Description:
ValidateComponent before Ancestor tag:  Assign postingvat.VatPeriod_ID + PeriodMark_ID.
Parameters:
input-output bcCurrencyCode
    ()
input-output blCurrencyFetched
    ()
input-output bdCCExchangeRate
    ()
input-output bdCCExchangeScale
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPreAssignPostingVat.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPreAssignPostingVat.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPreAssignVatGroup
Description:
ValidateComponentPreAssignVatGroup: submethod of ValidateComponentPre that takes care of the assignment of PostingVat.VatGroup_ID and that in-flight creates a VatGroup in a number of cases.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPreAssignVatGroup.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPreAssignVatGroup.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPreBalancePosting
Description:
ValidateComponentPreBalancePosting: submethod of ValidateComponentPre that adds postinglines to make the posting balanced in LC and CC.
Validations that need to be done before ANCESTOR CODE of ValidateComponent.
Parameters:
input idBalanceTC
    (Balance of the Posting in TC)
input idBalanceLC
    (Balance of the Posting in LC)
input idBalanceCC
    (Balance of the Posting in CC)
input iiNumberOfPostingLinesInPosting
    (NumberOfPostingLinesInPosting; The number of postng-lines that are involved in the posting)
input iiNumberOfCurrenciesInPosting
    (NumberOfCurrenciesInPosting; The number of currencies that are involved in the posting)
input ilPostingLineWithTCZeroForLC
    (PostingLineWithTCZeroExists: true in case the posting holds a line where all TC-amoutns are zero)
input ilPostingLineWithTCZeroForCC
    ()
input ilDifferentLCExchRatesInPosting
    (DifferentLCExchRatesInPosting: true in case the posting has lines with different LC-Exchange-rates)
input ilDifferentCCExchRatesInPosting
    (DifferentCCExchRatesInPosting: true in case the posting has lines with different CC-Exchange-rates)
input-output bgLCCCRoundingGLID
    (GL-ID of the account used for the rounding)
input-output bcLCCCRoundingGLCode
    (GL-Code of the account used for the rounding)
input-output bdLCRoundingMethodUnit
    (LCRoundingMethodUnit: Field RoundingMethod.RoundingMethodUnit of the currency that is LC)
input-output bdCCRoundingMethodUnit
    (CCRoundingMethodUnit: Field RoundingMethod.RoundingMethodUnit of the currency that is CC)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPreBalancePosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPreBalancePosting.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPreClearAutoBalAndRounding
Description:
This method removes all automatically generated posting lines to Auto-balance GL account.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPreClearAutoBalAndRounding.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPreClearAutoBalAndRounding.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentPreReplaceUnknown
Description:
ValidateComponentPreReplaceUnknown: This method replaces the unknow-values in the amount-fields of the class by zero.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentPreReplaceUnknown.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentPreReplaceUnknown.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentReversingPosting
Description:
This method is run when the posting is a reversing posting. If the status is create it makes a duplicate reversing posting of the the original posting. If it is a modify (or delete) it modifies (or deletes) both the original entry and the reversing entry.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentReversingPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentReversingPosting.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentReversingPostingCheck
Description:
This method does initial checks to see if there are any errors with the original entry that will prevent the reversing entry from being created
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentReversingPostingCheck.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentReversingPostingCheck.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentReversingPostingCreate
Description:
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentReversingPostingCreate.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentReversingPostingCreate.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentReversingPostingDelete
Description:
This method is for deleting automatic reversal entries. It marks the reversing entry for deletion.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentReversingPostingDelete.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentReversingPostingDelete.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentReversingPostingModifyOriginal
Description:
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentReversingPostingModifyOriginal.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentReversingPostingModifyOriginal.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponentReversingPostingModifyReversing
Description:
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateComponentReversingPostingModifyReversing.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponentReversingPostingModifyReversing.after:

END PROCEDURE.
**/

/*
Procedure: ValProject
Description:
Validate if the project is not a template
Parameters:
input icTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a component temp-table.)
input ilIsTemplate
    (Template)
input icTargetFieldMsgParam
    ()
input icProjectSystemStatus
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValProject.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValProject.after:

END PROCEDURE.
**/

/*
Procedure: GetPublictQCrossCyPostingFromBPosting
Description:
read table
Parameters:
output dataset tQCrossCyPostingFromBPosting
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BPosting.GetPublictQCrossCyPostingFromBPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPublictQCrossCyPostingFromBPosting.after:

END PROCEDURE.
**/

/*
Procedure: SetPublictQCrossCyPostingFromBPosting
Description:
write table
Parameters:
input dataset t_sQCrossCyPostingFromBPosting
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BPosting.SetPublictQCrossCyPostingFromBPosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetPublictQCrossCyPostingFromBPosting.after:

END PROCEDURE.
**/

/*
Procedure: IsOperationalReplicationEnabled
Description:
Retrieves the session value which indicates whether replication from financials to logistics is enabled
Parameters:
output olReplicationEnabled
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.IsOperationalReplicationEnabled.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.IsOperationalReplicationEnabled.after:

END PROCEDURE.
**/

/*
Procedure: MappedBufferCopy
Description:
Performs a buffer copy from a source buffer to a target buffer using the specified field mappings to copy the data.
Parameters:
input ihSourceBuffer
    (Handle to the source buffer from which the data is going to be copied.)
input ihTargetBuffer
    (Handle to the target buffer to which the data is going to be copied.)
input icBufferFieldMapping
    (Comma delimited list of the field mappings between the buffers. It does not matter if the list is in <target-buffer-field>,<source-buffer-field> order or vice versa progress will automatically switch the fields depending on is the target and source buffers.)
input icExcludeFields
    (Contains a comma delimited list of the fields that should not be copied by the from the source to the target.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MappedBufferCopy.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MappedBufferCopy.after:

END PROCEDURE.
**/

/*
Procedure: ValCharNotNULL
Description:
ValCharNotNULL: Validation-method that raises an error in case the character-field has the NULL value
Parameters:
input icTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a component temp-table.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValCharNotNULL.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValCharNotNULL.after:

END PROCEDURE.
**/

/*
Procedure: ValDateNotNULL
Description:
ValDateNotNULL: Validation-method that raises an error in case the date-field has the NULL value
Parameters:
input itTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a component temp-table.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValDateNotNULL.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValDateNotNULL.after:

END PROCEDURE.
**/

/*
Procedure: ValIntNotNULL
Description:
ValIntNotNULL: Validation-method that raises an error in case the integer-field has the NULL value
Parameters:
input igTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a component temp-table.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValIntNotNULL.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValIntNotNULL.after:

END PROCEDURE.
**/

/*
Procedure: AddDetailLine
Description:
Create a record in one of the class temp-tables.
Parameters:
input icTable
    (Database table name)
input icParentRowid
    (contents for field tc_ParentRowid (tc_Rowid of the parent record))
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.AddDetailLine.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddDetailLine.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdates
Description:
This method is part of the SetPublicTables flow.
When executed, data in the input class tables (prefix t_s) is validated and found correct, and copied into the class tables (prefix t_o).
This method can be extended to do updates that do not require a validation or that involve running business methods of other business classes. These classes should be started with ADD-TO-TRANSACTION = 'true'. Also make sure to add these classes in method StopExternalInstances.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.AdditionalUpdates.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalUpdates.after:

END PROCEDURE.
**/

/*
Procedure: apiDeleteInstance
Description:
Generic procedure for deleting database objects. This procedure contains the entire flow of loading the object data, validating if it can be deleted, deleting and deleting all related objects (= cascading deletes).
Parameters:
input icKey
    (Database instance key.
possible values:
'Rowid=...'
'Primary=...'
'Identity=...')
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.apiDeleteInstance.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.apiDeleteInstance.after:

END PROCEDURE.
**/

/*
Procedure: ApiDumpXmlRepresentation
Description:
Write an XML file with the object data of one or more database objects.
This XML file uses the standard schema found in <server installation folder>/xml/<class>.xsd.
It can be used as input for method ApiMaintainByXML and for the XML daemon.
Parameters:
input icRowids
    (Comma separated list of rowids of objects to include in the XML file)
input icFile
    (Full path name of the file in which the XML should be dumped.)
input ilHeaderOnly
    (When true, only the main table will be included in the generated XML representation.)
input ilSuppressEmptyFields
    (When true, blank fields will be removed from the XML Representation. Blank means empty string, or unknown value for all other data types. Zero is not considered an empty value.
When false, no fields will be removed.
When unknown value, fields with value identical to the default value of that column will be removed. If actual value is the unknown value, and the default value is not unknown value, this unknown value will not be removed.)
input iiPriority
    (If Priority is different from 0, an additional tag (Priority) will be added in the header of the XML object.)
input ilWriteXMLSchema
    (When true, also include the metaschema in the XML file.)
input icObjectRowId
    (If you want to restrict dumped data to a single object, pass the rowid of the object.
Otherwise leave blanc, and all objects identified by icRowids will be dumped.)
input ilExportForInput
    (When exporting an XML file to be used for direct input, some fields should be suppressed in the output:
tContextInfo.tcInvolvedCompanyCodes
tContextInfo.tcCorrelationId
tContextInfo.tcObjectIdentifier
all '*_ID' fields
all 'tc_Status' fields
(BLF-1908))
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiDumpXmlRepresentation.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiDumpXmlRepresentation.after:

END PROCEDURE.
**/

/*
Procedure: ApiDumpXmlRepresentationV01
Description:
Write an XML file with the object data of one or more database objects.
This XML file uses the standard schema found in <server installation folder>/xml/<class>.xsd.
It can be used as input for method ApiMaintainByXML and for the XML daemon.
Parameters:
input ipRowids
    (Comma separated list of rowids of objects to include in the XML file)
input icFile
    (Full path name of the file in which the XML should be dumped.)
input ilHeaderOnly
    (When true, only the main table will be included in the generated XML representation.)
input ilSuppressEmptyFields
    (When true, blank fields will be removed from the XML Representation. Blank means empty string, or unknown value for all other data types. Zero is not considered an empty value.
When false, no fields will be removed.
When unknown value, fields with value identical to the default value of that column will be removed. If actual value is the unknown value, and the default value is not unknown value, this unknown value will not be removed.)
input iiPriority
    (If Priority is different from 0, an additional tag (Priority) will be added in the header of the XML object.)
input ilWriteXMLSchema
    (When true, also include the metaschema in the XML file.)
input icObjectRowId
    (If you want to restrict dumped data to a single object, pass the rowid of the object.
Otherwise leave blanc, and all objects identified by icRowids will be dumped.)
input ilExportForInput
    (When exporting an XML file to be used for direct input, some fields should be suppressed in the output:
tContextInfo.tcInvolvedCompanyCodes
tContextInfo.tcCorrelationId
tContextInfo.tcObjectIdentifier
all '*_ID' fields
all 'tc_Status' fields
(BLF-1908))
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiDumpXmlRepresentationV01.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiDumpXmlRepresentationV01.after:

END PROCEDURE.
**/

/*
Procedure: ApiForcePublish
Description:
Publish any business object in event publishing.
Parameters:
input dataset tObject
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiForcePublish.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiForcePublish.after:

END PROCEDURE.
**/

/*
Procedure: ApiForcePublishWithEventType
Description:
Publish any business object in event publishing.
Parameters:
input dataset tObject
    ()
input icEventType
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiForcePublishWithEventType.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiForcePublishWithEventType.after:

END PROCEDURE.
**/

/*
Procedure: ApiGetIdentification
Description:
This method gives the possibility to get identification information (primary key, alternate key, rowid, object ID, object status) of the main table of the object, based on any of the keys of the table.
NOTE: for some business components, a few functions must be implemented manually :
- loading data starting from the alternate key
- defining the alternate key field names + values, starting from any of the other keys
(This is when the alternate key cannot be defined unambiguously by CB.)
Parameters:
input-output bcPrimaryKey
    (The primary key value of the main table of the object.
In case of a combined primary key, the different values should be separated with chr(2))
input-output bcAlternateKey
    (The alternate key value of the main table of the object.
In case of a combined alternate key, the different values should be separated with chr(2))
input-output bcRowid
    (The rowid of the main table record of the object.)
input-output bgObjectId
    (Identity field of the main table of the object.)
output ocObjectStatusValues
    (chr(2) seperated list of value of object status fields)
output ocObjectStatusFieldNames
    (Comma seperated list of field name of object status fields)
output ocPrimaryKeyFieldNames
    (List of primary key fields of the main table of the object.
This is a comma separated list.)
output ocAlternateKeyFieldNames
    (List of alternate key fields (names) of the main table of the object.
This is a comma separated list.)
output ocAlternateKeyFieldLabels
    (List of alternate key fields (translated labels) of the main table of the object.
This is a chr(2) separated list.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiGetIdentification.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiGetIdentification.after:

END PROCEDURE.
**/

/*
Procedure: ApiGetRoleScopeValues
Description:
Roles can be scoped to a single object (like for example a single project).
Run this method on the corresponding business component (= bproject) to get a list of possible objects (= projects) to scope a role to.
Parameters:
input igCompanyID
    (current CompanyID)
input igSharedSetID
    (current SharedSetID)
input icBusComponentConcept
    (BusComponentConcept of the business-component)
output ocRoleScopeValues
    (chr(2) separated list with the RoleScopeValues)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiGetRoleScopeValues.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiGetRoleScopeValues.after:

END PROCEDURE.
**/

/*
Procedure: apiMaintainByXml
Description:
Generic method for creating or updating object data.
This method provides the same functionality as the XML daemon.
Parameters:
input imDocument
    (contents of the XML document (or use parameter icFileName))
input icFileName
    (file name of the xml document (or use parameter imDocument))
output olSuccess
    (update completed successfully)
output dataset tXmlObjects
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.apiMaintainByXml.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.apiMaintainByXml.after:

END PROCEDURE.
**/

/*
Procedure: ApiReplicate
Description:
This is a generic procedure for updating database objects. This procedure is capable of handling multiple objects in one run, but cannot save draft instances if the input data is incorrect, like procedure ApiMaintainByDataset can.
Parameters:
input dataset-handle izInputData by-reference
    (class dataset)
input icActivityCode
    (Activity code (CREATE or MODIFY or DELETE) determines the kind of update. Value of tc_Status in the input data is ignored.
When empty, CREATE or UPDATE is assumed, depending on whether the input data already exists in the application database.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiReplicate.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiReplicate.after:

END PROCEDURE.
**/

/*
Procedure: BufferCopy
Description:
This method can be used to copy data from one temp-table to another.  It takes care about the normal fields, but also the temp-table fields (with prefix t<datatype>).
It copies all fields from the current record in the temp-table represented by ihFrom, to the current record in the temp-table represented by ihTo.
Parameters:
input ihFrom
    (The handle to the temp-table from which you want to copy the content.)
input ihTo
    (Handle to the temp-table to which you want to copy the content.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.BufferCopy.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.BufferCopy.after:

END PROCEDURE.
**/

/*
Procedure: Calculate
Description:
Add code here to initialize the calculated fields of the class temp-tables after loading existing records from the application database.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.Calculate.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.Calculate.after:

END PROCEDURE.
**/

/*
Procedure: CalculateMark
Description:
Parameters:
output oiCount1
    (Counts the total number of records in t* table which are read.)
output oiCount2
    (Counts the total number of records which are created in tAlreadyCalculatedRecords.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.CalculateMark.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CalculateMark.after:

END PROCEDURE.
**/

/*
Procedure: CheckValidationExceptionList
Description:
Evaluate updates in the class temp-tables.
If updates other than to fields listed in vcValidationExceptionList are found return true, otherwise return false.
Parameters:
input ilValidateInputData
    (When true, evaluate the input data (= tables with prefix t_s).
When false, evaluate the business data (= tables with prefix t_o).)
output olDoValidation
    ()
*/
/**
PROCEDURE BPosting.CheckValidationExceptionList.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CheckValidationExceptionList.after:

END PROCEDURE.
**/

/*
Procedure: ClearData
Description:
Remove contents of all class temp-tables.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ClearData.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ClearData.after:

END PROCEDURE.
**/

/*
Procedure: ConvertXmlToTable
Description:
read xml node and write to class temp-tables (t_s***)
Parameters:
input ihParentNode
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ConvertXmlToTable.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ConvertXmlToTable.after:

END PROCEDURE.
**/

/*
Procedure: CorrectionForPartialUpdate
Description:
Correct the data in the S buffer for a partial update

first, take care about the buffers with tc_status = "D".  If their rowid is not in the list of vcForceDeleteRowids, then they should be marked as tc_status = "" 

then, make sure to copy the O buffer value of fields that are in vcNeglectableFields to the S buffer
Parameters:
input icPartialUpdateExceptionList
    (Comma separated list with fields that need to be skipped in the test logic for partial update.
Fields in the list are specified as t<table>.<field>.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.CorrectionForPartialUpdate.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CorrectionForPartialUpdate.after:

END PROCEDURE.
**/

/*
Procedure: DataDelete
Description:
Validate if current database instance(s) present in the class temp-tables can be deleted in the application database. If so, set status to 'D'. Records will be removed from the database on commit of the transaction.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.DataDelete.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataDelete.after:

END PROCEDURE.
**/

/*
Procedure: DataDescription
Description:
Returns a table with metadata on all tables in the class dataset.
Useful for writing generic code that reads or updates these tables.
Parameters:
input ilAllTables
    (true = return all class tables
false = return only database tables)
input icDataLoadInputType
    (This parameter replaces the old parameters icRowids, icPkey, icObjectIds and matches the parameter icDataLoadInputType of the DataLoadByTable method. As only the DataLoadByTable method uses the tDataLoadInput table this parameter should be empty string for all other calls to the DataDescription method.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.DataDescription.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataDescription.after:

END PROCEDURE.
**/

/*
Procedure: DataLoad
Description:
Load data from the database into the class temp-tables of the business class.
Records can be selected based on primary keys (full or partly), rowids or identity values.
Parameters:
input icRowids
    (Comma seperated list of rowids of records of the main table, converted to string format.)
input icPkeys
    (List of the values of the primary key fields of records of the main table.
Fields are chr(2) seperated, keys are chr(4) seperated.
Fields are listed in the order as they appear in the primary index. You are not obliged to give a value for all fields of the primary index, but the list cannot contain any 'gaps'.)
input icObjectIds
    (Comma seperated list of values of the identity field of records of the main table.)
input icFreeform
    (In case none of the standard keys (primary, rowid, identity) are available, you can load data based on a freeform for each statement on the main table of the business class.
This for each statement should not contain break by, sorting or no-lock options.)
input ilKeepPrevious
    (True if the data to load must be added to the already existing data in the class temp-tables.
False if the data to load must replace the already existing data.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.DataLoad.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataLoad.after:

END PROCEDURE.
**/

/*
Procedure: DataLoadByInput
Description:
This method loads database records corresponding to input values (records found in the t_s*** tables).
When nothing found in the database, a new record should be initialised.
Input values should also be updated with :
- identity fields (override input values)
- tc_Rowid / tc_ParentRowid / tc_Status
Parameters:
output opPrimeKey
    (Primary Key field value of loaded record(s).
Keys are chr(4) separated.
Key fields are chr(2) separated.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.DataLoadByInput.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataLoadByInput.after:

END PROCEDURE.
**/

/*
Procedure: DataLoadByTable
Description:
This version of method DataLoad reads data based on keys stored in table tDataLoadInput.
Method scope is protected as this method is only intended to be used internally.
Parameters:
input icDataLoadInputType
    (Type of data entered in the tDataLoadInput table:
{&DATALOADINPUT-TYPE-ROWID}
 load by rowid stored in tDataLoadInput.trRowid
{&DATALOADINPUT-TYPE-OBJECTID}
 load by object ID stored in tDataLoadInput.tiObjectId
{&DATALOADINPUT-TYPE-PRIMKEY}
 load by primary key value stored in tDataLoadInput.tcPKey
 field values are chr(2) separated)
input ilKeepPrevious
    (True if the data to load must be added to the already existing data in the class temp-tables.
False if the data to load must replace the already existing data.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.DataLoadByTable.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataLoadByTable.after:

END PROCEDURE.
**/

/*
Procedure: DataNew
Description:
Create a new database instance in the class temp-tables. Existing contents of the class temp-tables will be discarded.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.DataNew.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataNew.after:

END PROCEDURE.
**/

/*
Procedure: DataSave
Description:
Write the data of current instance to the database.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.DataSave.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataSave.after:

END PROCEDURE.
**/

/*
Procedure: DataSaveWorker
Description:
A sub part of the transaction process.
This function must be public, so it can be called from the transaction component, but should not be used directly by the developer.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.DataSaveWorker.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataSaveWorker.after:

END PROCEDURE.
**/

/*
Procedure: DumpXmlRemoveFieldsNotForInput
Description:
remove fields from the xml that are irrelevant to direct input
Parameters:
input ihTableNode
    (x-noderef object)
*/
/**
PROCEDURE BPosting.DumpXmlRemoveFieldsNotForInput.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DumpXmlRemoveFieldsNotForInput.after:

END PROCEDURE.
**/

/*
Procedure: DumpXmlRepresentation
Description:
Write an XML file with the object data of the database object(s) currently in memory.
This XML file uses the standard schema found in <server installation folder>/xml/<class>.xsd.
It can be used as input for method ApiMaintainByXML and for the XML daemon.
Parameters:
input icFile
    (Full path name of the file in which the XML should be dumped.)
input ilHeaderOnly
    (indicates whether only the main table should be used in the generated XML representation.)
input ilSuppressEmptyFields
    (When true, blank fields will be removed from the XML Representation. Blank means empty string, or unknown value for all other data types. Zero is not considered an empty value.
When false, no fields will be removed.
When unknown value, fields with value identical to the default value of that column will be removed. If actual value is the unknown value, and the default value is not unknown value, this unknown value will not be removed.)
input iiPriority
    (If Priority is different from 0, an additional tag (Priority) will be supported in the header of the Xml string.)
input ilWriteXMLSchema
    (Also include the metaschema in the XML file)
input icObjectRowId
    (If you want to restrict dumped data to a single object, pass the rowid of the object.
Otherwise leave blanc, and all objects in memory will be dumped.)
input ilExportForInput
    (When exporting an XML file to be used for direct input, some fields should be suppressed in the output:
tContextInfo.tcInvolvedCompanyCodes
tContextInfo.tcCorrelationId
tContextInfo.tcObjectIdentifier
all '*_ID' fields
all 'tc_Status' fields
(BLF-1908))
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.DumpXmlRepresentation.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DumpXmlRepresentation.after:

END PROCEDURE.
**/

/*
Procedure: DumpXmlToLongchar
Description:
Write an XML representation of the database object(s) currently in memory to a longchar.
This XML representation uses the standard schema found in <server installation folder>/xml/<class>.xsd.
Parameters:
input ilHeaderOnly
    (indicates whether only the main table should be used in the generated XML representation.)
input ilSuppressEmptyFields
    (When true, blank fields will be removed from the XML Representation. Blank means empty string, or unknown value for all other data types. Zero is not considered an empty value.
When false, no fields will be removed.
When unknown value, fields with value identical to the default value of that column will be removed. If actual value is the unknown value, and the default value is not unknown value, this unknown value will not be removed.)
input iiPriority
    (If Priority is different from 0, an additional tag (Priority) will be supported in the header of the Xml string.)
input ilWriteXMLSchema
    (Also include the metaschema in the XML file)
input icObjectRowId
    (If you want to restrict dumped data to a single object, pass the rowid of the object.
Otherwise leave blanc, and all objects in memory will be dumped.)
input ilExportForInput
    (When exporting an XML file to be used for direct input, some fields should be suppressed in the output:
tContextInfo.tcInvolvedCompanyCodes
tContextInfo.tcCorrelationId
tContextInfo.tcObjectIdentifier
all '*_ID' fields
all 'tc_Status' fields
(BLF-1908))
output opXmlRepresentation
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.DumpXmlToLongchar.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DumpXmlToLongchar.after:

END PROCEDURE.
**/

/*
Procedure: EventPublishing
Description:
Wrapper for method PublishEvent, loop through all database objects in memory.
Parameters:
input ilForcePublish
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.EventPublishing.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.EventPublishing.after:

END PROCEDURE.
**/

/*
Procedure: EventPublishingLookForUpdates
Description:
look for a record in the class tables with updates (tc_Status not empty)
Parameters:
input icParentTable
    ()
input icParentRowid
    ()
input-output bcQueryNames
    ()
input-output bcQueryHandles
    ()
output olUpdateFound
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.EventPublishingLookForUpdates.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.EventPublishingLookForUpdates.after:

END PROCEDURE.
**/

/*
Procedure: GetActivities
Description:
Return a list of defined activity codes that can be performed by current user on any object of current class. Activities that cannot be run from the appshell (activity sequence = 0) are not included.
Parameters:
output dataset tActivities
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetActivities.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetActivities.after:

END PROCEDURE.
**/

/*
Procedure: GetActivitiesForObject
Description:
Return a list of defined activity codes that can be performed by current user on a specific object of current class. Activities that cannot be run from the appshell (activity sequence = 0) are not included.
Parameters:
input igObjectId
    (identity value)
input icUserLogin
    (User that will perform the activity
(Optional : when both icUserLogin and iiRoleId are empty, current user (from Session.Login) will be used))
input igRoleId
    (Role that will perform the activity
(Optional : when both icUserName and iiRoleId are empty, current user (from Session.Login) will be used))
output dataset tActivities
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetActivitiesForObject.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetActivitiesForObject.after:

END PROCEDURE.
**/

/*
Procedure: GetActivitiesForStatus
Description:
Returns a list of activities allowed on current object in the class temp-tables, based on the status of the object.
Blanc =  all activities allowed.
Parameters:
input igObjectId
    (Object ID)
output ocActivityCodes
    ()
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.GetActivitiesForStatus.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetActivitiesForStatus.after:

END PROCEDURE.
**/

/*
Procedure: GetBusinessFieldsGenCode
Description:
Parameters:
input icGenCode
    ()
output ocValueList
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetBusinessFieldsGenCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetBusinessFieldsGenCode.after:

END PROCEDURE.
**/

/*
Procedure: GetContextInfo
Description:
return a handle to the tContextInfo temp-table
Parameters:
output ohContextInfo
    ()
*/
/**
PROCEDURE BPosting.GetContextInfo.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetContextInfo.after:

END PROCEDURE.
**/

/*
Procedure: GetCustomFieldList
Description:
Returns a list of available custom fields
Parameters:
output ocFieldList
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetCustomFieldList.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetCustomFieldList.after:

END PROCEDURE.
**/

/*
Procedure: GetPKValues
Description:
Get the value of primary key fields of current record in a class temp-table.
Parameters:
input ihBuffer
    (handle to class temp-table buffer)
output ocPKValue
    (chr(2) seperated list of field values)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPKValues.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPKValues.after:

END PROCEDURE.
**/

/*
Procedure: GetXmlRepresentationDataset
Description:
Get a dataset with the object data of the database object(s) currently in memory.
This dataset uses the standard schema found in <server installation folder>/xml/<class>.xsd.
Parameters:
input icObjectRowId
    (If you want to restrict dumped data to a single object, pass the rowid of the object.
Otherwise leave blanc, and all objects in memory will be dumped.)
input ilHeaderOnly
    (indicates whether only the main table should be used in the generated XML representation.)
input iiPriority
    (If Priority is different from 0, an additional tag (Priority) will be supported in the header of the Xml string.)
output dataset-handle ozXMLDataset by-reference
    (This parameter should always be passed by-reference, meaning, the dataset handle should be created before the call.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetXmlRepresentationDataset.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetXmlRepresentationDataset.after:

END PROCEDURE.
**/

/*
Procedure: GetXmlRepresentationDSAddTable
Description:
Parameters:
input icTableName
    ()
input ictcRowid
    ()
input ictcParentRowid
    ()
input ilHeaderOnly
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetXmlRepresentationDSAddTable.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetXmlRepresentationDSAddTable.after:

END PROCEDURE.
**/

/*
Procedure: HandleSuppressEmptyFields
Description:
Method that is called recursively to handle the suppress emtpy fields option of DumpXmlRepresentation.
Parameters:
input ihParent
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.HandleSuppressEmptyFields.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.HandleSuppressEmptyFields.after:

END PROCEDURE.
**/

/*
Procedure: InitialValues
Description:
Add code here to initialize the calculated fields of a 'new' record (= a record that must be created in the application database) in a class temp-table.
Parameters:
input icTableName
    (Name of the database table of which a record is created in the class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.InitialValues.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.InitialValues.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDataset
Description:
This method uses contents of the input class temp-tables (prefix t_s) to perform the action specified in icAction.
SAVE : validate contents and write to database if correct
SAVEDRAFT : validate contents, write to database if correct, copy the data to the class tables (prefix t_o) and create draft instance if incorrect
DRAFT : copy data to the class tables (prefix t_o) and create draft instance
VALIDATE : only validate data
Parameters:
input icAction
    (SAVE
SAVEDRAFT
DRAFT
VALIDATE)
output opPrimaryKey
    ()
output opRowid
    ()
output oiDraftInstance
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MaintainByDataset.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MaintainByDataset.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetDefaulting
Description:
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MaintainByDatasetDefaulting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MaintainByDatasetDefaulting.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutput
Description:
This method uses contents of the input class temp-tables (prefix t_s) to perform the action specified in icAction. (if icAction is empty, it gets the default value of "SAVE")
SAVE : validate contents and write to database if correct
SAVEDRAFT : validate contents, write to database if correct, copy the data to the class tables (prefix t_o) and create draft instance if incorrect
DRAFT : copy data to the class tables (prefix t_o) and create draft instance
VALIDATE : only validate data

It returns the object dataset if required (if ilProvideOutput = true).
Parameters:
input icAction
    (SAVE
SAVEDRAFT
DRAFT
VALIDATE)
input ilReturnDataset
    (Indication whether the logic should return the official dataset of the object that has just been created/modified.)
input ilPartialUpdate
    (Indication whether the input dataset is a full object or only a partial one.)
input icPartialUpdateExceptionList
    (Comma separated list with fields that need to be skipped in the test logic for partial update.
Fields in the list are specified as t<table>.<field>.)
output opPrimaryKey
    (Primary Key field value of the tackled record(s) of the main table of the object,
Keys are chr(4) separated.
Key fields are chr(2) separated.)
output opRowid
    (Comma separated list of the rowids of the tackled record(s) of the main table of the object,)
output oiDraftInstance
    (Instance-ID of the created Draft)
output ocPrimaryKeyName
    (The name of the field(s) in the primary key of the object.  Normally this is the name of the object ID of the main table. (like creditor_ID))
output dataset-handle ozObjectRepresentation by-reference
    (The dataset containing the official representation of the object dataset. It should always be passed by-reference, meaning, the dataset handle should be created before the call.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutput.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutput.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputInit
Description:
This method is a sub-method of MaintainByDatasetWithOutput and holds the code that should only be executed once in the very beginning of this method
Parameters:
input-output bcAction
    (SAVE
SAVEDRAFT
DRAFT
VALIDATE)
output opPrimaryKey
    (Primary Key field value of the tackled record(s) of the main table of the object,
Keys are chr(4) separated.
Key fields are chr(2) separated.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputInit.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputInit.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputMain
Description:
MaintainByDatasetWithOutputMain: This method is a sub-method of MaintainByDatasetWithOutput and will either process all objects in a single transaction, either in a sperate transaction for every object - with the option that if doing everything in a single transaction fails, then process them one by one in a single transaction. 
NOTE: this is a recursive method (calling itself)
Parameters:
input icAction
    (SAVE
SAVEDRAFT
DRAFT
VALIDATE)
input ilReturnDataset
    (Indication whether the logic should return the official dataset of the object that has just been created/modified.)
input ilPartialUpdate
    (Indication whether the input dataset is a full object or only a partial one.)
input icPartialUpdateExceptionList
    (Comma separated list with fields that need to be skipped in the test logic for partial update.
Fields in the list are specified as t<table>.<field>.)
output opRowid
    (Comma separated list of the rowids of the tackled record(s) of the main table of the object,)
output oiDraftInstance
    (Instance-ID of the created Draft)
output ocPrimaryKeyName
    (The name of the field(s) in the primary key of the object.  Normally this is the name of the object ID of the main table. (like creditor_ID))
output dataset-handle ozObjectRepresentation by-reference
    (The dataset containing the official representation of the object dataset. It should always be passed by-reference, meaning, the dataset handle should be created before the call.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputMain.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputMain.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputMainCustTransTables
Description:
MaintainByDatasetWithOutputMainCustTransTables: This is a submethod of MaintainByDatasetWithOutputMain and MaintainByDatasetWithOutputMainSubTables that handles the CustTables and the TransString
Parameters:
input icTcRowidOfTheTTable
    (icTcRowidOfTheTTable: field tc_rowid of the t-record we just tackled in table tTempFcDynRel.thFcBuffer and that will be used as the parent-record in this method)
input igIDOfTheTTable
    (iiIDOfTheTTable: field xxx_ID of the t-record we just tackled in table tTempFcDynRel.thFcBuffer and that will be used as the parent-record in this method)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputMainCustTransTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputMainCustTransTables.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputMainPreOneByOne
Description:
MaintainByDatasetWithOutputMainPreOneByOne: This empty method is a sub-method of MaintainByDatasetWithOutputMain and is run at the beginning of processing the all objects one per one in a separate transaction
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputMainPreOneByOne.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputMainPreOneByOne.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputMainPreSave
Description:
MaintainByDatasetWithOutputMainPreSave: This empty method is a sub-method of MaintainByDatasetWithOutputMain and can be used to hold code that needs to be executed in case of processing the input of ApiMaintainByDatasetWithoutput one-by-one. In that case this method is executed for every transaction holding just one object and right before this data gets validated and saved.

Note the instance-data to handle is in the t_s-tables
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputMainPreSave.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputMainPreSave.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputMainSave
Description:
This method is a sub-method of MaintainByDatasetWithOutputMain and holds the code that executes the actual saving or validating or storing of the instance-data.
Parameters:
input icAction
    (SAVE
SAVEDRAFT
DRAFT
VALIDATE)
input ilReturnDataset
    (Indication whether the logic should return the official dataset of the object that has just been created/modified.)
input ilPartialUpdate
    (Indication whether the input dataset is a full object or only a partial one.)
input icPartialUpdateExceptionList
    (Comma separated list with fields that need to be skipped in the test logic for partial update.
Fields in the list are specified as t<table>.<field>.)
input ilReturnPrimaryKey
    (Set to true in case you want this method to fill in output param PrimaryKey)
input-output bcPrimaryKeyName
    (The name of the field(s) in the primary key of the object.  Normally this is the name of the object ID of the main table. (like creditor_ID).
Input-output param: in case the input value is already filled then it will not be changed)
output opRowid
    (Comma separated list of the rowids of the tackled record(s) of the main table of the object,)
output oiDraftInstance
    (Instance-ID of the created Draft)
output dataset-handle ozObjectRepresentation by-reference
    (The dataset containing the official representation of the object dataset. It should always be passed by-reference, meaning, the dataset handle should be created before the call.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputMainSave.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputMainSave.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputMainSubTables
Description:
MaintainByDatasetWithOutputMainSubTables: This is a submethod of MaintainByDatasetWithOutputMain that is called recusrsively and handles the copy of the instance-data from tTempFcDynRel to the real instance-tables
Parameters:
input icTableNameOfParent
    (TableNameOfParent: the name of the table the caller has tackled(tTempFcDynRel.tcFcTo) and that will be used as the parent-table in this method)
input icTcRowidOfTheTTable
    (icTcRowidOfTheTTable: field tc_rowid of the t-record we just tackled in table tTempFcDynRel.thFcBuffer and that will be used as the parent-record in this method)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputMainSubTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MaintainByDatasetWithOutputMainSubTables.after:

END PROCEDURE.
**/

/*
Procedure: ObjectStatusUpdate
Description:
This procedure contains code to be executed when the database object changes status.
This includes object creation.
This does not include object delete.
Parameters:
input icStatusFieldName
    ()
input icOldStatus
    (old status)
input icNewStatus
    (new status)
input igObjectId
    (identity field value)
input icObjectRowid
    (tc_Rowid of main table)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ObjectStatusUpdate.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ObjectStatusUpdate.after:

END PROCEDURE.
**/

/*
Procedure: PartialSetSTables
Description:
Method to set a dataset in the t_s temp-tables, based on a dataset-handle as input.
This is a variation of the SetSTables method, in the sense that it accepts a dataset as input that has an incomplete structure.  Some fields might be missing from the dataset that is sent in.
If fields are missing from the input, the value in the t_s buffer will be the unknown value (?).  It is the intention that in the rest of the flow of processing the data, these fields are treated separately, to make sure the original value of the changed record is not overwritten with the unknown value.
Parameters:
input dataset-handle izDatasetHandle by-reference
    (The input parameter holding a handle to the dataset with the input values. This must always be a subset of the official object dataset.  It might have missing fields.)
input ilIsPartialUpdate
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.PartialSetSTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.PartialSetSTables.after:

END PROCEDURE.
**/

/*
Procedure: PopulateXDocument
Description:
Populate the passed document handle with an XML representation of the database object(s) currently in memory.
This XML representation uses the standard schema found in <server installation folder>/xml/<class>.xsd.
Parameters:
input icObjectRowId
    (If you want to restrict dumped data to a single object, pass the rowid of the object.
Otherwise leave blank, and all objects in memory will be dumped.)
input ilHeaderOnly
    (indicates whether only the main table should be used in the generated XML representation.)
input ilSuppressEmptyFields
    (When true, blank fields will be removed from the XML Representation. Blank means empty string, or unknown value for all other data types. Zero is not considered an empty value.
When false, no fields will be removed.
When unknown value, fields with value identical to the default value of that column will be removed. If actual value is the unknown value, and the default value is not unknown value, this unknown value will not be removed.)
input iiPriority
    (If Priority is different from 0, an additional tag (Priority) will be supported in the header of the Xml string.)
input ilWriteXMLSchema
    (Also include the metaschema in the XML file)
input ilExportForInput
    (When exporting an XML file to be used for direct input, some fields should be suppressed in the output:
tContextInfo.tcInvolvedCompanyCodes
tContextInfo.tcCorrelationId
tContextInfo.tcObjectIdentifier
all '*_ID' fields
all 'tc_Status' fields
(BLF-1908))
input ihDocument
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.PopulateXDocument.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.PopulateXDocument.after:

END PROCEDURE.
**/

/*
Procedure: PostSave
Description:
Actions to take after writing current instance to the database, and before final commit of the transaction.
Use the field tc_status to test the status of the updated records:
'' = unchanged
'N' = new
'C' = changed
'D' = deleted
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.PostSave.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.PostSave.after:

END PROCEDURE.
**/

/*
Procedure: PostTransaction
Description:
Actions to take after final commit of the transaction.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.PostTransaction.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.PostTransaction.after:

END PROCEDURE.
**/

/*
Procedure: PreSave
Description:
Actions to take before writing current instance to the database (inside the db transaction!).
Use the field tc_status to test the status of the updated records:
'' = unchanged
'N' = new
'C' = changed
'D' = deleted
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.PreSave.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.PreSave.after:

END PROCEDURE.
**/

/*
Procedure: PublishEvent
Description:
Check if any event publishing is active for current class and publish (= create a request for the event daemon) the update if there is.
Parameters:
input ilAllChanges
    ()
input icStatusFieldName
    ()
input icOldStatus
    ()
input icNewStatus
    ()
input igObjectID
    ()
input icObjectRowid
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.PublishEvent.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.PublishEvent.after:

END PROCEDURE.
**/

/*
Procedure: ReadObjectSecurity
Description:
Returns object security on currently loaded (with DataLoad) object
Parameters:
output dataset tSelectedActivities
    ()
output dataset tSelectedUsers
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ReadObjectSecurity.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ReadObjectSecurity.after:

END PROCEDURE.
**/

/*
Procedure: ReadTable
Description:
Read field values of a specific record in one of the class temp-tables.
(Used from referential integrity)
Parameters:
input icTableName
    (class temp-table name)
input icQuery
    (read statement)
input icFieldNames
    (Comma seperated list of table field names)
input ilConvertToDisplayFormat
    (Only relevant for decimal or date fields)
output ocFieldValues
    (chr(3) seperated list of the field values (if a record is found))
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ReadTable.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ReadTable.after:

END PROCEDURE.
**/

/*
Procedure: SetNewStatus
Description:
Change the status of all current class temp-table records to 'N'.
Useful for making a copy of a database instance.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.SetNewStatus.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetNewStatus.after:

END PROCEDURE.
**/

/*
Procedure: SetRowidConvert
Description:
Creates or updates a tFcRowidConvert record to link client rowids to instance rowids.
Parameters:
input icOldRowid
    ()
input icNewRowid
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.SetRowidConvert.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetRowidConvert.after:

END PROCEDURE.
**/

/*
Procedure: StopExternalInstances
Description:
Stop instances that are started in AdditionalUpdates as part of current transaction
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.StopExternalInstances.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.StopExternalInstances.after:

END PROCEDURE.
**/

/*
Procedure: UndoStatus
Description:
Remove all records from tFcRowidConvert created during last transaction, because this transaction was rolled back.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.UndoStatus.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.UndoStatus.after:

END PROCEDURE.
**/

/*
Procedure: UpdateLastModified
Description:
update LastModified*** fields
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.UpdateLastModified.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.UpdateLastModified.after:

END PROCEDURE.
**/

/*
Procedure: UpdateStatus
Description:
Reset field tc_Status of the class temp-tables to blanc, after the transaction is completed.
Replace dummy rowid's in field tc_Rowid and tc_ParentRowid with the real ones.
(wrapper for the generated method)
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.UpdateStatus.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.UpdateStatus.after:

END PROCEDURE.
**/

/*
Procedure: UpdateWorkobject
Description:
When updating a database object that is registered in workflow, lookup the corresponding work object and update the status of it (either return the work object to sender or delete it).
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.UpdateWorkobject.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.UpdateWorkobject.after:

END PROCEDURE.
**/

/*
Procedure: ValCharForbiddenCharCodes
Description:
Validation mask to check if a certain field contains any characters commonly used as field separator, like pipe(|) or comma(,), and return an error if it does.
Parameters:
input icTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a component temp-table.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValCharForbiddenCharCodes.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValCharForbiddenCharCodes.after:

END PROCEDURE.
**/

/*
Procedure: ValCharMandatory
Description:
Validation mask: character field cannot be empty.
Parameters:
input icTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.ValCharMandatory.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValCharMandatory.after:

END PROCEDURE.
**/

/*
Procedure: ValDateMandatory
Description:
Validation mask: date field cannot be empty.
Parameters:
input itTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.ValDateMandatory.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValDateMandatory.after:

END PROCEDURE.
**/

/*
Procedure: ValDecMandatory
Description:
Validation mask: decimal field cannot be empty (= unknown value).
Parameters:
input idTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.ValDecMandatory.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValDecMandatory.after:

END PROCEDURE.
**/

/*
Procedure: ValDecNotZero
Description:
Validation mask: decimal field cannot be zero.
Parameters:
input idTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.ValDecNotZero.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValDecNotZero.after:

END PROCEDURE.
**/

/*
Procedure: ValidateActivityCode
Description:
check if current user has permission to perform current activity on current object(s)
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateActivityCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateActivityCode.after:

END PROCEDURE.
**/

/*
Procedure: ValidateBC
Description:
Validate the class temp-tables, when values are created / modified in the business class.
Because all validations are written on the t_s*** tables, and business code maintains it's data in the t_o*** tables, data from the t_o*** tables is first copied into the t_s*** tables, and copied back after the validation (in case the validation updated some fields).
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateBC.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateBC.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponent
Description:
Write here all tests on database update (new / modify / delete) that cannot be coded with a validation mask.
The type of update can be found in tc_status (N/C/D).
If you find incorrect data, you must write an entry in tFcMessages (using SetMessage) and set the return status of this method to either +1 or -1.
Return status +1 = data will still be accepted.
Return status -1 = data will not be accepted.
This method is run from SetPublicTables, before transferring the received data into the class temp-tables.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.ValidateComponent.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateComponent.after:

END PROCEDURE.
**/

/*
Procedure: ValidateCustomFields
Description:
Check if values on active custom fields meet the validation criteria in the definition of the custom field and return an error if they don't.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateCustomFields.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateCustomFields.after:

END PROCEDURE.
**/

/*
Procedure: ValidateCustomFieldsGenCode
Description:
Parameters:
input icGenCode
    ()
input icFieldName
    ()
input icFieldValue
    ()
input icRowid
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateCustomFieldsGenCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateCustomFieldsGenCode.after:

END PROCEDURE.
**/

/*
Procedure: ValidateFieldSecurity
Description:
This method validates the field security on the business side. It verifies that business fields that may not be modified are not modified.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateFieldSecurity.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateFieldSecurity.after:

END PROCEDURE.
**/

/*
Procedure: ValidateUI
Description:
Validate the class temp-tables, when values are created / modified by a user interface class, and sent to the business class as input parameter of a public method, other than SetPublicTables.
When data in the t_s*** tables is correct, it is copied into the t_o***tables.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValidateUI.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValidateUI.after:

END PROCEDURE.
**/

/*
Procedure: ValIntMandatory
Description:
Validation mask: integer cannot be empty (= unknown value).
Parameters:
input igTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.ValIntMandatory.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValIntMandatory.after:

END PROCEDURE.
**/

/*
Procedure: ValIntNotZero
Description:
Validation mask: integer field cannot be zero.
Parameters:
input igTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.ValIntNotZero.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValIntNotZero.after:

END PROCEDURE.
**/

/*
Procedure: ValIsActive
Description:
On relations to a table with an 'IsActive' field, use this validation mask to check the field and return an error if an object that is not active is referenced.
Parameters:
input icTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a component temp-table.)
input ilIsActive
    (Active flag)
input icParentObjectLabel
    (parent object)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValIsActive.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValIsActive.after:

END PROCEDURE.
**/

/*
Procedure: ValLogMandatory
Description:
Validation mask: logical field cannot be empty.
Parameters:
input ilTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ValLogMandatory.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValLogMandatory.after:

END PROCEDURE.
**/

/*
Procedure: ValueChanged
Description:
Check if a business field has changed value.
Parameters:
input icFieldName
    ()
output olChanged
    ()
*/
/**
PROCEDURE BPosting.ValueChanged.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ValueChanged.after:

END PROCEDURE.
**/

/*
Procedure: WriteObjectSecurity
Description:
Create or update object security for the database object available in the class dataset.
Parameters:
input dataset tSelectedActivities
    ()
input dataset tSelectedUsers
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.WriteObjectSecurity.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.WriteObjectSecurity.after:

END PROCEDURE.
**/

/*
Procedure: XmlColumnDetail
Description:
This method is called from within the generic code to create an XML representation of a component instance.  It is called for each column in the component that is represented in the XML document.
In this method, one can add method calls to other components for sub-representations.  For example: customer information on an order object.

/**  EXAMPLE CODE
assign oiReturnStatus = -98.

case icTableName :
    when "order":U
    then case icColumnName :
            when "custnum":U
            then do :
                if not available torder or
                   rowid(tOrder) <> ihBuffer:rowid
                then buffer tOrder:find-by-rowid(ihBuffer:rowid) no-error.
                if available tOrder
                then do :
                run XMLrepresentation (input  torder.custnum (icKey), 
                                input  'customer.name':U (icColumns), 
                                input  ihCurrentNode (ihStartingNode), 
                                output viFcReturnSuper (oiReturnStatus)) in bOrder
                end.
            end.
         end case.
end case.
assign oiReturnStatus = viFcReturnSuper.
**/
Parameters:
input icTableName
    (Name of the (class) table to which the column belongs.)
input icColumnName
    (Name of the concerning column)
input ihBuffer
    (Handle to the table buffer)
input ihField
    ()
input ihParentNode
    (Handle to the current XML node.)
input ilSuppressEmptyFields
    (if true, the empty fields will be dropped out of the xml representation.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.XmlColumnDetail.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.XmlColumnDetail.after:

END PROCEDURE.
**/

/*
Procedure: XmlObjectDetail
Description:
This method is called from within the generic code to create an XML representation of a component instance.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.XmlObjectDetail.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.XmlObjectDetail.after:

END PROCEDURE.
**/

/*
Procedure: XmlTableDetail
Description:
This method is called from within the generic code to create an XML representation of a component instance.  It is called for each table in the component that is represented in the XML document.
In this method, one can add method calls to other components for sub-representations.  For example: customer information on an order object.
Parameters:
input icTableName
    (Database table name)
input ihBuffer
    (handle to temp-table buffer (with current record available))
input ihParentNode
    (node handle in the XML document)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.XmlTableDetail.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.XmlTableDetail.after:

END PROCEDURE.
**/

/*
Procedure: GetComment
Description:
Parameters:
input icDomain
    ()
input icRef
    ()
input icType
    ()
input icLang
    ()
input iiIndx
    ()
input iiSeq
    ()
output opComment
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetComment.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetComment.after:

END PROCEDURE.
**/

/*
Procedure: GetExchangeRate
Description:
GetExchangeRate: this method will provide you the correct exchange-rate based upon the input parameters you provide.
Parameters:
input igCompanyID
    (CompanyID: the company wherefor you want to retrieve the exchange-rate - when empty then the current company is used)
input igFromCurrencyID
    (FromCurrencyID: when this is not specified and the associated Code-parameter is not filled either, then an error is raised)
input icFromCurrencyCode
    (FromCurrencyCode: this is only used and required in case the associated ID-parameter is not filled)
input igToCurrencyID
    (ToCurrency ID: when this is not specified and the associated Code-parameter is not filled either, then the local-/base-currency is used as the ToCurrency)
input icToCurrencyCode
    (ToCurrencyCode: this is only used in case the associated ID-parameter is not filled)
input igExchangeRateTypeID
    (ExchangeRateType ID: when this is not specified and the associated Code-parameter is not filled either, then the rate-type will be set to Accounting)
input icExchangeRateTypeCode
    (ExchangeRateType Code: this is only used in case the associated ID-parameter is not filled)
input itValidityDate
    (ValidityDate: Date you want to know the exchange-rate for. If nothing is passed then the sytem-date is used as validaty-date)
output odExchangeRate
    (Exchange Rate (always Multiply) of the retrieved rate.

Sample: 
When you have 120 EUR and you want to know how many HRK this is then you call this method like this :
 -  From-curr:  EUR 
 - To-curr:  KRK
Then odExchangeRate will be 8 as 1 EUR = 8 HRK (and odExchangeScale will be 1).

So the value in HRK of 120 EUR will be: 
120 * 8 * 1
(AmountInFromCurr) * odExchangeRate * odExchangeScale)
output odExchangeScaleFactor
    (Exchange Rate Scale Factor of the retrieved rate)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetExchangeRate.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetExchangeRate.after:

END PROCEDURE.
**/

/*
Procedure: AddAdditionalInfoInCTLOG
Description:
This procedure is just meant to log extra information in ctlog to allow a better troubleshooting.
Parameters:
input icTrace
    ()
input icParam1
    ()
input icParam2
    ()
input icParam3
    ()
input icParam4
    ()
input icParam5
    ()
input icParam6
    ()
input icParam7
    ()
input icParam8
    ()
input icParam9
    ()
*/
/**
PROCEDURE BPosting.AddAdditionalInfoInCTLOG.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AddAdditionalInfoInCTLOG.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalDocumentation
Description:
This procedure only cotains comments which are important for the class.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.AdditionalDocumentation.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.AdditionalDocumentation.after:

END PROCEDURE.
**/

/*
Procedure: ApiActivitiesAreAllowed
Description:
check if a user has security rights for a list of activities
Parameters:
input icUserLogin
    ()
input icCompanyCode
    ()
input icActivityCodes
    (comma separated list)
output ocAllowed
    (comma separated list of true or false according to the input activity codes)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiActivitiesAreAllowed.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiActivitiesAreAllowed.after:

END PROCEDURE.
**/

/*
Procedure: apiActivityIsAllowed
Description:
check if user has security rights for an activity
Parameters:
input icUsrLogin
    (login name)
input icCompanyCode
    (Entity Code)
input icActivityCode
    (Activity Code)
output olIsAllowed
    (has access)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.apiActivityIsAllowed.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.apiActivityIsAllowed.after:

END PROCEDURE.
**/

/*
Procedure: ApiGetAlternateKeyValues
Description:
This procedure can be used to convert filtering conditions (on browses or reports) on primary key fields into filtering conditions on alternate key fields, which are more readable. This procedure will for example convert a language ID (which is a meaningless number) into a language code. Conversion rules are generated based on the definition of related key business fields in the business class.
Parameters:
input dataset tFilter
    (input dataset with filter conditions)
output dataset tBusinessFieldValues
    (output dataset with converted displayable filter conditions)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiGetAlternateKeyValues.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiGetAlternateKeyValues.after:

END PROCEDURE.
**/

/*
Procedure: ApiQueryFilterPrepare
Description:
This method contains generic code for parsing the input filter criteria for API queries in table tFilter.
Parameters:
input icTables
    (tables in the query)
input-output dataset tFilter
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiQueryFilterPrepare.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiQueryFilterPrepare.after:

END PROCEDURE.
**/

/*
Procedure: ApiSetAcitivityCode
Description:
This method is used in QRA, to set the activity code.
Parameters:
input icActivityCode
    (The activity code of current action.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ApiSetAcitivityCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ApiSetAcitivityCode.after:

END PROCEDURE.
**/

/*
Procedure: BusinessClassActions
Description:
Provide all necessary functions to start and stop instances of a business class, both for stateless and for state-reset environments.
Parameters:
input icClassShortname
    (Shortname of the business class)
input icAction
    (Possible actions:
Start                        Close
Open                       Stop
Start+Open             Close+Stop
                               Store)
input ilSubtransaction
    (Start the new business instance as part of current transaction yes/no.)
input-output biClassOpenCount
    (use vi{&CLASS}OC)
input-output bhClassInstanceHandle
    (use vh{&CLASS}Inst)
input-output biClassInstanceId
    (use vi{&CLASS}Id)
input icDraftReference
    (A description for the stored instance)
input icUserDefinedContext
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.BusinessClassActions.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.BusinessClassActions.after:

END PROCEDURE.
**/

/*
Procedure: ClearMessages
Description:
Clear the message list (tFcMessages).
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.ClearMessages.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ClearMessages.after:

END PROCEDURE.
**/

/*
Procedure: CustomFields
Description:
Returns the name of all active custom business fields in the class dataset.
Parameters:
input icTableName
    (Database table name)
output ocFieldNames
    (comma seperated list of field names)
output ocFieldLabels
    (chr(2) seperated list of user-defined labels for custom business fields, translated to current-language)
output ocFormats
    ()
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.CustomFields.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CustomFields.after:

END PROCEDURE.
**/

/*
Procedure: DefineCustomRelations
Description:
This method is foreseen in the abstract component, and is available on all business components and should be used to define information about relations to custom tables in the component.  This method is always empty in case of a non-customized component.  The method should be implemented using non-intrusive customization in order to get the relations known to the UI side.
Typically, this method contains code as follows:

create tCustomRelation.
assign tCustomRelation.tcParentTable = "tCurrency"
       tCustomRelation.tcChildTable = "tCustomTable1"
       tCustomRelation.tcChildTableDescription = "Variantion"
       tCustomRelation.tlIsOneToOne = false.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.DefineCustomRelations.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DefineCustomRelations.after:

END PROCEDURE.
**/

/*
Procedure: DefineState
Description:
Allows to add tables to the state dataset
(ihStateDataset:add-buffer(...))
Parameters:
input ihStateDataset
    ()
*/
/**
PROCEDURE BPosting.DefineState.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DefineState.after:

END PROCEDURE.
**/

/*
Procedure: DumpInstanceData
Description:
dump all current instance data into an XML file
Parameters:
input icXMLFileName
    (full path file name to write the instance data to
(when blanc, no file will be created))
input icXSDFileName
    (full path file name to write the XML schema of the instance data to
(when blanc, no file will be created))
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.DumpInstanceData.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DumpInstanceData.after:

END PROCEDURE.
**/

/*
Procedure: ExitInstance
Description:
This method can be extended with code to execute when an instance of a business class is stopped.

Standard functionality in this method is
- Clean up instance data in the fcInstance table.
- Create or update a draft instance if applicable.
Parameters:
input icDraftReference
    (Description for the draft instance.
This parameter will have a value when creating a draft instance.)
input icDraftFormName
    (This parameter will have a value when creating a draft instance.)
input ilDraftIsShared
    (This parameter will have a value when creating a draft instance.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ExitInstance.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ExitInstance.after:

END PROCEDURE.
**/

/*
Procedure: ExitProgram
Description:
This method can be extended with code to execute when a business component is stopped.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.ExitProgram.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ExitProgram.after:

END PROCEDURE.
**/

/*
Procedure: GetBusinessFields
Description:
Returns a full description of all business fields of a business class, browse or report.
Parameters:
input icReference
    (- <classname> for receiving business field information of a business class
- <classname>.<methodname> for receiving business field information of a browse or report)
output dataset tBusinessFields
    ()
output dataset tCustomRelation
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetBusinessFields.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetBusinessFields.after:

END PROCEDURE.
**/

/*
Procedure: GetCustomFieldValues
Description:
fill in a column of a temp-table with custom fields from a business object main table
Parameters:
input ihResultSetBuffer
    ((buffer) handle to the temp-table that must be updated)
input icClass
    (shortname of the business class from which custom fields must be read)
input icTable
    (database table name from which custom fields must be read)
input icKeyColumn
    (name of the column in the result set temp-table that contains the value of primary key of the objects for which custom fields must be read)
input icCustomFieldColumn
    (name of the column in the result set temp-table where custom field values will be stored)
input icCustomBusinessField
    (The can be left blank.
You can specify here the name of the custom busininess fields if you want the value of just 1 of them.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetCustomFieldValues.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetCustomFieldValues.after:

END PROCEDURE.
**/

/*
Procedure: GetDomainFormat
Description:
This method allows to overrule the standard display format of a domain
Parameters:
input icDomainName
    ()
output ocDisplayFormat
    (display format, using the progress syntax)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetDomainFormat.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetDomainFormat.after:

END PROCEDURE.
**/

/*
Procedure: GetKeyFields
Description:
Returns the name of all key fields of a table in the class dataset.

primary key = all fields of the primary index of the table
alternate key = all fields of an index that is an 'alternate key'
(If a table has exactly one unique index other than the primary index, and all fields in that index are business fields, this index automatically becomes the alternate key. Otherwise an index must be marked as alternate key manually.)
object ID = one field of the table that is an 'identity' field
object status = one or more fields of the table that is a 'status' field
Parameters:
input-output bcTableName
    (Database table name.
When left blanc, the name of the main table of the class dataset will be returned.)
output ocPrimaryKey
    (comma seperated list of database field names (excluding table name))
output ocAlternateKey
    (comma seperated list of database field names (excluding table name)
these fields MUST be defined as business field)
output ocObjectID
    (database field name (excluding table name) of the identity field)
output ocObjectStatus
    (database field name (excluding table name) of the status field)
output ocDependency
    (Indicate if the table is dependent from company or a shared set.
If so, company or shared set code must be included in the alternate key.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetKeyFields.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetKeyFields.after:

END PROCEDURE.
**/

/*
Procedure: GetLocalisationCode
Description:
Returns current active localisation code.
Parameters:
output ocLocalisationCode
    ()
*/
/**
PROCEDURE BPosting.GetLocalisationCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetLocalisationCode.after:

END PROCEDURE.
**/

/*
Procedure: GetPublicData
Description:
Procedure for reading the value of public data items, except temp-tables and datasets.
Parameters:
input icDataList
    (Comma seperated list of public data item names to set (full name, including prefix).
Data items with extent and temp-tables are not supported.)
output ocValues
    (chr(3) seperated list of the values.
Format of the values:
decimal = always uses decimal point
date = YYYYMMDD
logical = true / false)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.GetPublicData.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPublicData.after:

END PROCEDURE.
**/

/*
Procedure: InitInstance
Description:
This method can be extended with code to execute when an instance of a business class is started.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.InitInstance.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.InitInstance.after:

END PROCEDURE.
**/

/*
Procedure: LoadSystemSettings
Description:
Load system settings (see class BSetting) and store them in variables available to all business classes.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.LoadSystemSettings.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.LoadSystemSettings.after:

END PROCEDURE.
**/

/*
Procedure: LoadUIstate
Description:
load UI state
Parameters:
output omState
    (State data)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.LoadUIstate.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.LoadUIstate.after:

END PROCEDURE.
**/

/*
Procedure: MainBlock
Description:
This method can be extended with code to execute when a business component is started.
Use it to initialise data items that are not part of the business component state.
(Data items that are part of the business component state should be initialised in InitInstance.)
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.MainBlock.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.MainBlock.after:

END PROCEDURE.
**/

/*
Procedure: ReadSessionValues
Description:
Read some comonly used values from session like current user login or current company ID and store these values in variables available to all business classes.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.ReadSessionValues.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.ReadSessionValues.after:

END PROCEDURE.
**/

/*
Procedure: SaveUIstate
Description:
save UI state
Parameters:
input imState
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.SaveUIstate.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SaveUIstate.after:

END PROCEDURE.
**/

/*
Procedure: SetMessage
Description:
Create a message to send back to the client (either a UI or another application)
Parameters:
input icMessage
    (The actual message, can contain $1, $2, ... for values that are situation-dependent.)
input icArguments
    (chr(2) seperated list of values to replace $1, $2, ... in the message with. These values should not be translatable.)
input icFieldName
    (Optional name of a business field, to link the message to that field.)
input icFieldValue
    (Optional value of the business field, converted to string type.)
input icType
    (Type of message:
E = user error (incorrect input, this type of error is linked to a business field)
D = database error (other errors)
S = system error (or programming error)
W = warning, results in return status +1 (the transaction can still proceed))
input iiSeverity
    (Error severity level (used to sort the messages on in the error viewer):
1 = critical
2 = high
3 = normal
4 = low)
input icRowid
    (Optional rowid to link the message to a single record in the class temp-table (mentioned in parameter icFieldName).
Refers to the field tc_Rowid.)
input icFcMsgNumber
    (A unique number per CB project.
DO NOT CHANGE THIS PARAMETER)
input icFcExplanation
    (Long description, fully explaining what exactly caused the error or warning, and what has to be done to solve the error/warning involved.)
input icFcIdentification
    (If the error is linked to a specific business object, this field should fully identify this object.
The content of this field is considered to be untranslatable.)
input icFcContext
    (Change the description of the icContext parameter of the SetMessage method.

Here, the developer can pass extra context information to the end-user that can help him to understand why things went wrong. 

This field contains context information, like booleans, data items, result of buffer-compare. 
We advise to use the syntax "<Field>=<Value>chr(2)<Field>=<Value>...." as this is recognized by the error viewer. 
The content of this field is considered to be untranslatable.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BPosting.SetMessage.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetMessage.after:

END PROCEDURE.
**/

/*
Procedure: SetPublicData
Description:
Procedure for updating the value of public data items, except temp-tables and datasets.
Parameters:
input icDataList
    (Comma seperated list of public data item names to set (full name, including prefix).
Data items with extent and temp-tables are not supported.)
input icValueList
    (chr(3) seperated list of the values to set.
Format of the values:
decimal = use decimal point, replace comma with a point
date = YYYYMMDD
logical = true / false)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.SetPublicData.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetPublicData.after:

END PROCEDURE.
**/

/*
Procedure: StartCacher
Description:
Start the cacher technical component, if not yet running.
The component will be run only once and will be kept into memory until the server shuts down (stateless) or the user disconnects (state-reset).
Parameters:
output ohCacher
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.StartCacher.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.StartCacher.after:

END PROCEDURE.
**/

/*
Procedure: StartPersistence
Description:
Start the persistence component, if not yet running.
The component will be run only once and will be kept into memory until the server shuts down (stateless) or the user disconnects (state-reset).
Parameters:
output ohPersistence
    (Handle to the correct persistence component.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.StartPersistence.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.StartPersistence.after:

END PROCEDURE.
**/

/*
Procedure: StoreState
Description:
Store current instance as a draft instance in the application database (fcDraftInstance table)
Parameters:
input icDescription
    (Description for the draft instance.)
input icUIClass
    (Shortname of the user interface class used to open the draft instance with.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.StoreState.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.StoreState.after:

END PROCEDURE.
**/

/*
Procedure: UICustomization
Description:
Parameters:
input icControlName
    ()
input icEventName
    ()
input dataset tUIInput
    ()
output dataset tUIOutput
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BPosting.UICustomization.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.UICustomization.after:

END PROCEDURE.
**/

/*
Procedure: GetPublicTables
Description:
read class tables
Parameters:
output dataset BPostingO
    (class tables)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BPosting.GetPublicTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.GetPublicTables.after:

END PROCEDURE.
**/

/*
Procedure: DataNewGetPublicTables
Description:
combine DataNew and GetPublicTables
Parameters:
output dataset BPostingO
output oiReturnStatus
*/
/**
PROCEDURE BPosting.DataNewGetPublicTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataNewGetPublicTables.after:

END PROCEDURE.
**/

/*
Procedure: DataLoadGetPublicTables
Description:
combine DataLoad and GetPublicTables
Parameters:
input icRowids
input icPkeys
input icObjectIds
input icFreeform
input ilKeepPrevious
output dataset BPostingO
output oiReturnStatus
*/
/**
PROCEDURE BPosting.DataLoadGetPublicTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.DataLoadGetPublicTables.after:

END PROCEDURE.
**/

/*
Procedure: SetPublicTables
Description:
write class tables
Parameters:
input il_Validate
    (validate data in class tables and reject if invalid
     when il_Validate = false, data can only be saved as a draft)
input dataset BPostingS
    (class tables)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BPosting.SetPublicTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetPublicTables.after:

END PROCEDURE.
**/

/*
Procedure: SetPublicTablesDataSave
Description:
combine SetPublicTables and DataSave
Parameters:
input dataset BPostingS
    (class tables)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BPosting.SetPublicTablesDataSave.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.SetPublicTablesDataSave.after:

END PROCEDURE.
**/

/*
Procedure: CreatePosting
Description:
add a record in a class table
Parameters:
input ic_ParentRowid
    (value of tc_Rowid field of parent row)
output dataset BPostingS
    (class tables, containing only the newly created row)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BPosting.CreatePosting.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CreatePosting.after:

END PROCEDURE.
**/

/*
Procedure: CreatePostingLine
Description:
add a record in a class table
Parameters:
input ic_ParentRowid
    (value of tc_Rowid field of parent row)
output dataset BPostingS
    (class tables, containing only the newly created row)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BPosting.CreatePostingLine.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CreatePostingLine.after:

END PROCEDURE.
**/

/*
Procedure: CreatePostingSaf
Description:
add a record in a class table
Parameters:
input ic_ParentRowid
    (value of tc_Rowid field of parent row)
output dataset BPostingS
    (class tables, containing only the newly created row)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BPosting.CreatePostingSaf.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CreatePostingSaf.after:

END PROCEDURE.
**/

/*
Procedure: CreatePostingVat
Description:
add a record in a class table
Parameters:
input ic_ParentRowid
    (value of tc_Rowid field of parent row)
output dataset BPostingS
    (class tables, containing only the newly created row)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BPosting.CreatePostingVat.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CreatePostingVat.after:

END PROCEDURE.
**/

/*
Procedure: CreatePostingVatDelay
Description:
add a record in a class table
Parameters:
input ic_ParentRowid
    (value of tc_Rowid field of parent row)
output dataset BPostingS
    (class tables, containing only the newly created row)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BPosting.CreatePostingVatDelay.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CreatePostingVatDelay.after:

END PROCEDURE.
**/

/*
Procedure: CreatePostingWHT
Description:
add a record in a class table
Parameters:
input ic_ParentRowid
    (value of tc_Rowid field of parent row)
output dataset BPostingS
    (class tables, containing only the newly created row)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BPosting.CreatePostingWHT.before:

END PROCEDURE.
**/
/**
PROCEDURE BPosting.CreatePostingWHT.after:

END PROCEDURE.
**/
